Malformed string


If you see this error, it usually means the the client is not able to transform the string you wrote to the character set acceptable to the Firebird server. Here's a short explanation how this works:

In your client program, you type in some text, which is then shown on the screen. This text has the same character set like the rest of your environment. Typically it is UTF8 on Linux, and various WIN-xxxx charset on Windows (WIN-1252 in Western Europe, WIN-1250 in Eastern Europe, etc.).

Your client tool should then transliterate this to the connection character set of your Firebird connection, and the Firebird server transliterates that to the character set of the actual columns when it stores the string into the database. If your client tool is not 'smart' enough to do the transliteration, you should set the connection character set to be the same as your environment character set. For example, if you're using isql and have a West-Europe Windows, you should type this at the beginning of your isql session:

SET NAMES WIN1252;

With this, you can even work with UTF8 databases while using isql. Some tools (like, for example, FlameRobin) are more advanced and do the needed transliteration for you, so you can use some other character set for connection (for example UTF8) without problems.


Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page.

If you are a commercial tool maker and your tool features a great way to handle the issue written about in this FAQ, please check out our advertisement page.



All contents are copyright © 2007-2017 FirebirdFAQ.org unless otherwise stated in the text.


Links   Firebird   News   FlameRobin   Home Inventory powered by FB  
Add content   Advertise   About  

Categories
 Newbies
 SQL
 Installation and setup
 Backup and restore
 Performance
 Security
 Connectivity and API
 HOWTOs
 Errors and error codes
 Miscellaneous