GENERAL: WRONG RESULT IN STRING ESCAPE SEQUENCES
Information in this article applies to:
In my C source code I am using special characters in strings.
string1[ ] = "Fran\x07ais\0"
I expected that this would result in the word Français. However, it appears that the Compiler uses 0x7A since the result is just Franzis.
Is this a known bug?
This is a standard ANSI behaviour. To get what you expect you need to break strings at the Escape Sequences. The expected result is generated when you write:
string1[ ] = "Fran" "\x07" "ais\0"
Last Reviewed: Monday, December 13, 2004
of your data.