Issue Details (XML | Word | Printable)

Key: CORE-3227
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Paul Vinkenoog
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

ASCII_VAL() fails if argument contains multi-byte character anywhere

Created: 11/Nov/10 04:05 PM   Updated: 24/May/11 08:55 AM
Component/s: Engine
Affects Version/s: 2.1.3, 2.5.0
Fix Version/s: 2.1.4, 2.5.1, 3.0 Alpha 1

Time Tracking:
Not Specified

Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
According to the 2.1 Release Notes, ASCII_VAL() raises an error if the first character of the argument is multi-byte. This makes sense.

In practice, the function fails if the string contains a multi-byte character *anywhere*:

(connection charset is ISO8859_1)

  select ascii_val (cast('Hoplala' as char(12) character set utf8)) from rdb$database
  
returns 72

  select ascii_val (cast('Hopläla' as char(12) character set utf8)) from rdb$database

raises

  335544321
  arithmetic exception, numeric overflow, or string truncation
  Cannot transliterate character between character sets


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.