On Apr 19, 2007, at 6:06 PM, Norman Palardy wrote:

>
> On 19-Apr-07, at 3:40 PM, Charles Yeomans wrote:
>
>>
>> On Apr 19, 2007, at 5:38 PM, Norman Palardy wrote:
>>
>>>
>>> On 19-Apr-07, at 2:13 PM, Charles Yeomans wrote:
>>>
>>>>
>>>> Perhaps a request to add TextEncoding.BOM() as String would be in
>>>> order.
>>>
>>> <http://www.realsoftware.com/feedback/viewreport.php?
>>> reportid=qncisurq>
>>>
>>> In the mean time an extends method will do :)
>>
>> Not really - -such methods are not virtual.
>
> It doesn't seem to need to be from what I can see
>
>       function BOM(extend t as textEncoding)
>               return t.Chr(&hFEFF)
>       end function
>
> Use it like
>
>    dim te as TextEncoding
>    dim mydata as string = "123456üøoö"
>    dim bs as MemoryBlock
>
>    te = Encoding(myData)
>    bs = te.BOM
>
>
> Seems to work just fine with all encodings

You're right; it does, because it's calling through to  
TextEncoding.Chr, which does the right thing.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to