Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Open Tools API    [ Add a report in this area ]  
Report #:  67271   Status: Closed
IOTAEditBlock.Text returns corrupted UTF-8 instead of the declared string/UnicodeString type
Project:  Delphi Build #:  12.0.3170.16989
Version:    12.0 Submitted By:   Erik Berry
Report Type:  Basic functionality failure Date Reported:  9/28/2008 3:47:35 PM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   267296
Resolution: Fixed (Resolution Comments) Resolved in Build: : 12.0.3273.18681
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
IOTAEditBlock.Text is declared to return the selection as a string/UnicodeString, but it returns something much closer to each byte of a UTF-8 encoding of the selection as a separate character, so most characters end up corrupted.

Ideally, this function would convert the edit block's bytes into a valid string/UnicodeString, so the implementation matches the declaration.
Steps to Reproduce:
Open attached package, click install
Type/paste any unicode or high-ASCII character into a source editor (example: À, or unicode char U+0246)
Select that single character
Help, Execute Wizard

Expected: ShowMessage dialog with just the selected character in the message
Actual: Currupt string shows instead
Workarounds
None
Attachment
TestEditBlock.zip
Comments

Chris Hesik (Embarcadero) at 12/12/2008 9:31:45 AM -
This has the same root cause as QC #67596

Server Response from: ETNACODE01