if i don't use my string.replace it look good (with accents)
it seems it's a pb with module.
currently i work with TM1640 Module
last week i was working with Max7219
with the max's Module i use an arrayBuffer
SPI2.setup({mosi:B15, sck:B13});
var disp = require("MAX7219").connect(SPI2, B14);
var g = Graphics.createArrayBuffer(8,8,1); // Create graphics
g.flip = function() { disp.raw(g.buffer); }; // To send to the display
g.drawString("Mémé");
g.flip(); // update what's on the display
with the arrayBuffer, accents must be encoded.
But with the TM1640 Module, we drawString directly in the display
var g = require("TM1640").connect({din: NodeMCU.D7, clk: NodeMCU.D5}, function() {
g.drawString("Mémé");
g.setContrast(2); // a value between `0` lowest and `7` highest intensity.
g.flip();
});
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
i answer myself
if i don't use my string.replace it look good (with accents)
it seems it's a pb with module.
currently i work with TM1640 Module
last week i was working with Max7219
with the max's Module i use an arrayBuffer
with the arrayBuffer, accents must be encoded.
But with the TM1640 Module, we drawString directly in the display
is it the cause of the encoding pb?
regards