Subject | Re: [firebird-support] utf8 and isql script |
---|---|
Author | Peter Lee |
Post date | 2009-12-21T12:26:02Z |
Thanks for all the help. SET NAMES UTF8, ensuring the script file is
encoded as UTF8 and ensuring that IBExpert was giving us the correct
strings when extracting has solved the problems.
PL
Helen Borrie wrote:
Peter Lee ptle@...
-----------------------------------------------------------------------
Rising Software Australia Pty. Ltd. http://www.risingsoftware.com/
Publishers of 'Auralia' - Ear Training and 'Musition' - Theory Training
Ph: +61 3 9481 3320 FAX: +61 3 9481 3380 USA Freecall: 1 888 667 7839
[Non-text portions of this message have been removed]
encoded as UTF8 and ensuring that IBExpert was giving us the correct
strings when extracting has solved the problems.
PL
Helen Borrie wrote:
> At 10:22 AM 19/12/2009, Peter Lee wrote:--
>
>
>>> If the former, I'm afraid that it sounds like IBExpert is reading Qt's
>>> unicode characters and (probably) writing a file in a normal 8 bit
>>> character set.
>>>
>>> If the latter, then isql is unable to read the unicode.
>>>
>>>
>>>
>> IBExpert shows the strings in two ways - unicode and plain text. When
>> the database is updated via Qt code, unicode looks like this: più and
>> plain text looks like this: più - which is fine.
>>
>> However - regardless of which version I place in my sql script for
>> processing through isql - I end up with incorrect values. I have a SET
>> NAMES UTF8; at the start of my script - which seems to work if I have
>> this string; 'più', but not this 'più'.
>>
>
> SET NAMES tells the client to expect UTF-8 characters in the input. Consider the following:
>
> 1. If the input is in some other character set, then the only characters that will be "correct" (from your point of view) are the ones that are 7-bit characters in single-byte charsets, since they are common to all character sets, including UTF-8. Let's refer to these characters as "the common characters" for our purposes here.
>
> 2. You will have the same problem with metadata object names if they include
> characters that are NOT common characters and those object names are not double-quoted.
>
> You are not saying how you created these scripts, either. If IBExpert has some utility for creating scripts then it is not very likely that those scripts would be in UTF-8, since IBE is written in Delphi and Delphi does not support UTF-8.
>
> It's possible you need to encode your scripts before passing them into isql. You might like to look at Notepad++ (Google for it), a free editor for Windows that can encode UTF-16 and ansi text as UTF-8.
>
> Discovering the exact cause of your problem looks like an issue for IBExpert's user list, though; or you could ask about it in Firebird-tools.
>
> ^ heLen ^
>
>
>
>
> ------------------------------------
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Yahoo! Groups Links
>
>
>
>
>
>
Peter Lee ptle@...
-----------------------------------------------------------------------
Rising Software Australia Pty. Ltd. http://www.risingsoftware.com/
Publishers of 'Auralia' - Ear Training and 'Musition' - Theory Training
Ph: +61 3 9481 3320 FAX: +61 3 9481 3380 USA Freecall: 1 888 667 7839
[Non-text portions of this message have been removed]