This discussion is archived
0 Replies Latest reply: Mar 8, 2010 11:08 AM by 843810 RSS

C language and 'wide' chars handling crashes

843810 Newbie
Currently Being Moderated
We are internationalizing our product and have run into an issue that I hope someone will have some ideas about. The problem is that when we are using foreign keyboards with our internationalized app, some of the keys (e.g. Cedilla on French keyboard) cause our app to crash. I have debugged the issue to a call to C toupper() and verified that its only an issue with 64 bit opteron (not 32 sparc). Upon doing some research it turns out that towupper() should be used instead to deal with these 'wide' characters. Since changing this and the many libc family calls (e.g. strlen, strcat, strstr, isalpha, isalnum) in our codebase would be a rather large task with some potential unintended side-effects for the stateful returns, we are hoping there is another approach. Anyone out there have any suggestions before I start a mass find & replace & fix.

Thanks,
Mike