• Hello,

    it should be a newb question... sorry.
    i'm working with a 8x8 led matrix
    I'm working with string with extented latin chars (éèêàâî,,,).
    to draw the string on the display with accents we have to convert accents with char hexa value.

    "mémé"

    become

    "m\xe9m\xe9"

    i'm a lazy guy and decide to convert the sentence when it's sent to matrix.
    i use this code;

    phrase = phrase.replace(/[^\x00-\x7F]/g, function(m) {
        return "\\x" + m.charCodeAt(0).toString(16);
    });
    

    it's look as it have to look, but the string is sent as is and i saw on the display "m\xe9m\xe9" and not "mémé" as it should.
    What i'have missed?

    regards

About

Avatar for Mrbbp @Mrbbp started