Crazy acentuation

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

Crazy acentuation

Post by digo_rp »

Hi, all, I´m having a problem with my os.

I have my command prompt... so... when the user type wrong command it´s display an error message in portuguese... we have acentuations... the message is...
" Comando ou nome de arquivo inválido..." in english "Bad command or file name..."

you see that "á" against "a", so... that "á" give 2 more characteres in sizeof("comando ou nome de arquivo inválido...")
shoun´t be the same size "á" or "a"?

my operating system display 1 chars before that "á"
like the acentuation...

forgive to my poor english...

could anyone help me, please?
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

Re: Crazy acentuation

Post by digo_rp »

Thanks so much, problem solved!

The problem was in my text editor, I´m using notepad++.

I change my text from UTF-8 to ANSI.

thanks so much...
intx13
Member
Member
Posts: 112
Joined: Wed Sep 07, 2011 3:34 pm

Re: Crazy acentuation

Post by intx13 »

You might want to check out this article for some basics on Unicode: http://www.joelonsoftware.com/articles/Unicode.html

In short, in UTF8 some Unicode "code points" (characters) take 1 byte and some take 2 or more. If possible you should try to use and support Unicode (whether UTF8, UTF16, or UTF32) instead of using outdated and incompatible standards like ASCII. But even if you aren't ready to start using Unicode, definitely read through that article.
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

Re: Crazy acentuation

Post by digo_rp »

thanks so much, I´ll take a look at...
Post Reply