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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Print strings with accents and special chars Ikerkaz 8 678 12-20-2025, 09:28 PM
Last Post: TempodiBasic
  plotting shapes not working madscijr 6 619 10-22-2025, 05:29 AM
Last Post: SMcNeill
  why isn't _FULLSCREEN working? madscijr 5 509 09-20-2025, 01:47 AM
Last Post: SMcNeill
  I'm working on an old MS-DOS thingy... KlamPs 2 503 08-25-2025, 09:43 AM
Last Post: hsiangch_ong
  blue circle isn't drawing and print isn't working? madscijr 12 2,302 09-21-2024, 06:13 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: 1 Guest(s)