This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi gurus, I have one application,which takes a field from database and submits to another server/system via HTTP URL interface.The database field may contain umlaut characters(coming under Latin char set).for eg.������ etc.,.If i take those values and submit it to other server/system then the value is not reaching the destination properly.It has some other values.But if i harcode these values in a string then its reaching fine.. what is the problem behind it?.should i need to change any system configuration. Quick responses would be highly appreciated. Thanks, Paramaguru.
Well, there are a lot of places where problems could occur in this process. Basically you need to find out what character encoding is being used/expected at various stages in the process. Whenever you exchange data between systems, make sure both systems are using the same encoding. Do not trust the default encoding supplied by a platform; it may be different from platform to platform. Whenever you create a Reader or Writer, insert an InputStreamReader or OutputStreamWriter which specifies exactly what encoding to use. And remember that even if your programs do everything correctly, if you look at data using another program (e.g. Notepad, or a web browser, or a database tool) it may be that that tool is expecting a different encoding. Or some tools may not have the necessary fonts to display the character you want to look at. It's all very annoying to deal with, and hard to give more advice in general - a lot depends on the situation. But the basic key is to make sure you know what enconding is used at every step of the process. Good luck.