Is possible to somehow write those special characters in DOS? (Sorry but i forgot the english name of them).
Because in portuguese we use it a lot.
Is possible to somehow write those special characters in DOS? (Sorry but i forgot the english name of them).
Because in portuguese we use it a lot.
Well... ü is the ascii character 129. The others I believe are Unicode, unless I'm not seeing them on the ascii chart. Most of the accented vowels and consonants that appear in French and Spanish appear to be there, but for some reason some common ones from other languages (like for instance a with an acute) aren't there. If you want to print a character by it's ascii value, just cast the integer value.Oh, by the way... since 128 to 255 is extended, it may vary on different computers, so even with those a standard Unicode format is more acceptable, I think.Code:std::cout << (char)129;
Last edited by SlyMaelstrom; 09-28-2006 at 05:54 PM.
Sent from my iPad®
The Extended ASCII set has all characters needed for the Portuguese language.
Just make sure your editor allows for ISO 8859-1 or ANSI 1252 Latin 1.
It is possible that an expression such as std::cout << "canção"; might fail at the console by displaying the wrong characters. If that is the case, then you must also have the console set for the correct codepage.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Ok, i'll search how to "correct" my console in google
In general I believe you should not use non-ANSI characters in string literals. You'd store the strings in a data file and read them from there.Originally Posted by Mario F.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
Though, keep in mind, you'll likely have to "fix" the consoles of any other computer that runs it too... that can be a pain on distribution. To be honest, I have no idea how to use a specific Unicode set in C++ as I'm from the US and our alphabet is adequately supported by ASCII.
You could always google it.
Sent from my iPad®
Google tells me how to make the console show acents characters, but i have no idea of how to config my msvs to use "ISO 8859-1 or ANSI 1252 Latin 1".
(Anyway the app is just for my pc )
In general it's compiler/OS-specific. In MS VC++/Win32 you can't even output Unicode with std::wcout, you need to call the WriteConsole() API function to output Unicode characters, EVEN if those characters exist in the default system codepage.Originally Posted by SlyMaelstrom
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
> You could always google it.
It is still a pain to code for Unicode
It made me buy a book.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Hmm, I should write a bookOriginally Posted by Mario F.
I do think I'll post a Unicode tutorial on the Windows forum, though. I have quite a bit of experience working with it.
You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.
> Google tells me how to make the console show acents characters, but i have no idea of how to config my msvs to use "ISO 8859-1 or ANSI 1252 Latin 1".
It's somewhere on the editor options or somthing. Look around there for "codepage"... or "locale" maybe (doubt it).
But do remember that this is just so that you can actually see the portuguese characters in the editor. Chances are the editor is already configured for ANSI 1252. Cat advise meanwhile is easy to skip, but very important. Avoid string literals like the one I shown you. That was just an example to address another issue. Store them in files instead and load them at run time.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Darn! Do that, when you canOriginally Posted by Cat
I'm always surpised at the near lack of information regarding Unicode programming when you hear everywhere how important it should be. One of those inconsistencies roughtly scratching the "Do as I say, don't do as I do".
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
system("graftabl [xxx]") should allow you to change the codepage of your console. where [xxx] is replaced by the codepage number.
It is too clear and so it is hard to see.
A dunce once searched for fire with a lighted lantern.
Had he known what fire was,
He could have cooked his rice much sooner.
That sounds like a good idea to me. Or maybe even write an article/series of articles and maybe we can get some activity on the articles discussions boardOriginally Posted by Cat
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared
*barf*Originally Posted by King Mir
Sent from my iPad®