Followers 0

# REALLY strange change in value of character data being pointed at

## 1 post in this topic

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 Studios 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, Ive checked the encodings of both files and they are indeed both in UTF8 format, so I dont understand what is causing this error! Please help

0

##### Share on other sites

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

0

## Create an account

Register a new account