Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


REALLY strange change in value of character data being pointed at


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 BloodOrange1981   Members   -  Reputation: 234

Like
0Likes
Like

Posted 19 June 2013 - 11:26 PM

Hi, I have an array of char data that holds the UTF 8 character string "%c本ゲームの#5Cシステムデータ#0Cは\n"

"オートセーブに対応しています。". This string then gets passed to a function with the protoype
 
CSaveData::UTF8toSJISForce(char *dst,size_t buffsize,const char *src )

like so:

CSaveData::UTF8toSJISForce( szText, sizeof( szText ), tmpBuf );

where tmpBuf is the character data. When stepping through Visual Studio`s debugger the value of tmpBuf is as expected in the function call above, but when entering the UTF8to... function I check the value of src in the debugger and it is now -  "譛繧繝繝縺#5C繧繧繝・Β繝・・繧#0C縺繧繝繝医そ繝繝悶↓蟇蠢懊縺縺・∪縺吶・" which is of course not what is expected. 

 

The call to UTF8... is in one file and the implementation is in another .cpp file, I`ve checked the encodings of both files and they are indeed both in UTF8 format, so I don`t understand what is causing this error! Please help

 


Sponsor:

#2 BloodOrange1981   Members   -  Reputation: 234

Like
0Likes
Like

Posted 20 June 2013 - 12:35 AM

Please disregard this, after an hour or so I realised this wasn`t the fault in the code! Super sorry!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS