Re: Numeric equivalents of characters
Posted by: Rick James
Date: October 01, 2014 11:16PM

Converting a word would probably take a Stored Procedure, something like:
DELIMITER //
CREATE STORED PROCEDURE Unicode2Num(
        IN _word VARCHAR(99)
)
BEGIN
    SET @word := _word;
    WHILE (LENGTH(@word) > 0)
    BEGIN
        SELECT CONCAT(ord(convert(LEFT(@word, 1) using ucs2)), ' ';
        SET @word := MID(@word, 1);
    END
END //
DELIMITER ;
-- Sample usage:
CALL Unicode2Num('באב');

(Caveat: there may be errors; I did not test the code.)

Options: ReplyQuote


Subject
Views
Written By
Posted
2751
September 29, 2014 05:09PM
1376
October 01, 2014 12:24AM
Re: Numeric equivalents of characters
1381
October 01, 2014 11:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.