> similar to does not match x'##'-codes
> -------------------------------------
> 
>                  Key: CORE-4114
>                  URL: http://tracker.firebirdsql.org/browse/CORE-4114
>              Project: Firebird Core
>           Issue Type: Bug
>           Components: Engine
>     Affects Versions: 2.5.2
>          Environment: Win7/64
>             Reporter: Thomas Beckmann
> 
> 
> As this example points out, x'##'-codes are not properly matched by similar
> to:
> 
> select
>   iif(' ' similar to '[[:WHITESPACE:]]', 'T', 'F'),
>   iif(x'20' similar to '[[:WHITESPACE:]]', 'T', 'F'),
>   iif(x'20' similar to '%', 'T', 'F')
> from RDB$DATABASE
> 
> returns 'T', 'F', 'F'

In a comment, Vlad Khorsun wrote:

        Thomas, 

        x-prefixed literals have charset OCTETS and it could be a reason for 
such issues. 

        Try to use charset introducer before literal, for example:   _win1252 
x'20' 


I am naïve when it comes to charset issues, as an arrogant North American 
dealing with charset is a rarity (the world only writes in English, no?), but I 
find the idea that all x-prefixed literals should be treated as OCTETS to be 
problematic.  

I would have thought that the engine would 'auto-translate' the values based on 
the context.


Sean


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to