Home > other >  About through the IIC access block Chinese string to the EEPROM
About through the IIC access block Chinese string to the EEPROM

Time:09-18

I try to put the Chinese string through (void) transformation type, then block in eeprom, again with % c, results in a serial port to see all became a question mark, is there a way to solve

CodePudding user response:

The size of the Chinese characters are two bytes, and % c just a byte it definitely shows don't come out!

CodePudding user response:

reference 1st floor water 枂 reply:
the size of the Chinese characters are two bytes, and % c just must show not to come out of it a byte

Is there a way to solve

CodePudding user response:

I didn't, so you can not turn direct deposit a try, anyway, the data will not change, keep in mind is how to save you read it

CodePudding user response:

I have a try, thanks

CodePudding user response:

reference 3 floor water 枂 reply:
I am not so used, you can not turn direct deposit a try, anyway, the data will not change, remember is how to save you read it

Not much, I don't know how to take out here

CodePudding user response:

It is best to use the source code to store/read, do not use conversion
Really need to transform and don't use % c, you can use the % s have a look, you use % s to structure to 0 at the end of the string

CodePudding user response:

refer to 6th floor worldy response:
it is best to use the source code to store/read, don't use conversion
Really need to transform and don't use % c, you can use the % s look, use % s to structure to 0 at the end of the string

Good?? I have a try
  • Related