Avatar for Mrbbp


Member since Mar 2017 • Last active Jun 2020
  • 26 conversations

I'm newb with espruino, not with arduino, not with js...
But i'm not a coding ninja

Most recent activity

  • in General
    Avatar for Mrbbp

    ok, thanks for your time.

    i extend toUpperCase() to upperCase French diacritic accents

    String.prototype.toUpperCaseFr = function toUpperCaseFr() {
        return this.toUpperCase().replace(/à/gm, "À").replace(/â/gm, "Â").replace(/é/gm, "É").replace(/è/gm, "È").replace(/ê/gm, "Ê").replace(/ë/gm, "Ë").replace(/î/gm, "Î").replace(/ï/gm, "Ï").replace(/ô/gm, "Ô").replace(/ö/gm, "Ö").replace(/û/gm, "Û").replace(/ü/gm, "Ü").replace(/ù/gm, "Ù").replace(/ç/gm, "Ç").replace(/œ/gm,"Œ");

    it's working.


  • in General
    Avatar for Mrbbp

    Hello @Gordon,
    nope, minification does not help.
    i'll write my own toUpperCaseDiacritic()


  • in General
    Avatar for Mrbbp

    the problem is: it was working, but not now!

  • in JavaScript
    Avatar for Mrbbp

    If i upperCase string with accents, it does not work on accents!

    let txt= "béèàîâ";
    txt = txt.toUpperCase();
    console.log(txt); // Béèàîâ
    let txtUp = "bÉÈÀÎÂ";
    txtUp = txtUp.toUpperCase();
    console.log(txtUp); // BÉÈÀÎÂ
    for( let c of txt) {
      console.log(c, c.charCodeAt(0));
    for( let c of txtUp) {
      console.log(c, c.charCodeAt(0));

    espruino pico firmware 2v05.100 chrome appweb ide 0.73.7

  • in General
    Avatar for Mrbbp

    found a way to declare my accents, by using their ascii code (but it's less readable by human)

  • in General
    Avatar for Mrbbp

    the error is on the key ("é" of my array), not the content with accent.
    if i remove the key with accents, everythings is good (there is accent in the content, see in 'i' key



  • in General
    Avatar for Mrbbp

    Hello @Gordon
    my Chrome app is web ide 0.73.7

    last week? or 2 week ago (don't remember)
    i was working with a code in espruino that work great.
    when i attempt to upload to my espruino pico (just modifying a typo)
    the ide return:

    ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v05.100 (c) 2019 G.Williams
    >Uncaught SyntaxError: Got ?[233] expected ID
     at line 1 col 289
    ...t+1','eu+2','ev+2','ez+1'],?[233]:['?­[233] ?[226]+1','?[233] c+1','?[233] e+1','?[233] j+1','?[233]...

    same firmware, same espruino pico...

    the part code is about accents (yes again!)
    i do not have this pb on June 8th!

    have an idea?

    i use custom font (no web ide) :/

    const aKerning = {