Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Need help about the codepage!
icon6.gif  Need help about the codepage! [message #33507] Tue, 16 August 2011 11:59 Go to next message
akebee is currently offline  akebee
Messages: 90
Registered: August 2011
Location: China
Member
when i use some core function,
For example, GetExeFilePath();

i got a string like this"F:\game\²âÊÔ.exe";

i found that the string "²âÊÔ"was UTF-8 code,so it can not
display correctly!In my system GBK can display correctly¡£

so what can i do? Very Happy
Re: Need help about the codepage! [message #33508 is a reply to message #33507] Tue, 16 August 2011 13:14 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
You could try to take a look at the package Core. It has a file called CharSet.h. This file has a bunch of UTF-8 related functions. You can start from ToUnicode() or ToCharset().


Regards,
Novo

[Updated on: Mon, 22 August 2011 04:01]

Report message to a moderator

Re: Need help about the codepage! [message #33525 is a reply to message #33508] Sun, 21 August 2011 00:43 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
Hello Akebee

When handling file names I use FromSystemCharset() to read file names into U++ String and ToSystemCharset() to set file names.


Best regards
Iñaki
Re: Need help about the codepage! [message #33582 is a reply to message #33507] Fri, 26 August 2011 01:56 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
akebee wrote on Tue, 16 August 2011 05:59

when i use some core function,
For example, GetExeFilePath();

i got a string like this"F:\game\²âÊÔ.exe";



Got where? What means are you using to display this string and on what platform.

All filenames get converted to the encoding of your application, which by default is UTF-8. And if you use GUI functions (like PromptOK), it should display correctly as well.

Things can be different for console.

Mirek
Previous Topic: BUG? or Not BUG? LoadFile(filename) and then getting wrong data
Next Topic: Retriving data in record containing ""
Goto Forum:
  


Current Time: Fri Apr 26 06:40:00 CEST 2024

Total time taken to generate the page: 0.02211 seconds