Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spanish accented chars not working
#1
Hi to all! 

I'm trying to read a TXT with a spanish text, full of accented characters (like á or Á) and obviously our beloved ñ and Ñ Tongue

I have loaded a font in memory (with _LOADFONT) and I'm trying to PRINTSTRING my file, but it is impossible. My screen is full of strange characters, and I don't know what to do... I think that it is an "unicode" problem, but I don't understand this thing... sorry Sad

Thank you very much.
10 PRINT "Hola! Smile"
20 GOTO 10
Reply
#2
Your file is probably encoded in UTF-8.

Read the contents using _READFILE$ and then print it using _UPRINTSTRING using the encoding argument 8.

See:
https://qb64phoenix.com/qb64wiki/index.php/READFILE$
https://qb64phoenix.com/qb64wiki/index.php/UPRINTSTRING
Reply
#3
(03-14-2024, 12:46 PM)a740g Wrote: Your file is probably encoded in UTF-8.

Read the contents using _READFILE$ and then print it using _UPRINTSTRING using the encoding argument 8.

See:
https://qb64phoenix.com/qb64wiki/index.php/READFILE$
https://qb64phoenix.com/qb64wiki/index.php/UPRINTSTRING

AMAZING! I didn't know that options in _UPRINTSTRING... in fact, I didn't know this instruction ... (my face is turning red)
Thank you very much Smile
10 PRINT "Hola! Smile"
20 GOTO 10
Reply




Users browsing this thread: 1 Guest(s)