Re: Supported characters
- From: Brendan Murphy <bmurphy@xxxxxxxxxxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Mon, 19 Jan 2009 09:29:32 -0600
Ryan Dary wrote:
> I've noticed that some characters are not being retained between XML
> and
> the control. For instance, the copyright symbol gets converted to a
> copyright symbol plus some strange character. I enter the copyright
> symbol on my Mac by pressing option-G. Also, I copied and pasted some
> text into it that contained the "smart" quote character for single-
> quote
> (the slightly bent apostrophe) and it gets converted to a strange 'i'
> character with an accent mark.
>
> Is there something I'm doing wrong? I'm just taking the xml provided
> from one control and passing it to another control.
>
> I don't know if this helps, but I saw behavior like this when I
> started
> using Memory blocks to walk character arrays. I would use a memory
> block with the assumption that it would be faster than splitting a
> string into an array. The problem is the interpretation of some
> characters. Now, to make a character array I use:
>
> Dim stringArray() As String = Split("My String")
>
> And that will properly retain the non-ASCII characters.
>
> Has anyone else noticed this character support issue?
I don't see this either in cutting and pasting, saving out and
reading back in, or transfering between controls. Are you using
the latest beta?
What you are describing is a classic encoding problem. Somewhere
along the line the string has lost its encoding (which should be
UTF-8). When you put the string into a memory block and start
walking the data, you become responsible for handling multi-byte
characters which includes UTF-8. When you pull it out of the
memory block you are responsible that it has the right encoding.
FTC Website:
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in
the subject field.
Other related posts: