Announcement

Collapse
No announcement yet.

UTF 8 header remains

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Edwin Knoppert
    replied
    Yes i know, some xml and textfiles are in unicode.

    but i solved it by saving it as ansi and reopen Visual Studio, i simply had the content in sight and was writting it to UTF8 each time

    Leave a comment:


  • Robert Wallace
    replied
    Whatever i do the signs" " remain on the first line!
    " " is the UTF8 for U+FEFF which is the "Byte Order Marker" but which seems to have been extended to mean a signature for UTF8 coded files.

    I have only ever seen it appear once in a file and always at the beginning.

    Bob

    Leave a comment:


  • Edwin Knoppert
    replied
    This changes it to different symbols but the content itself is correct (as was before, weird symbols are just added)

    Code:
    Function UT8TOAnsi( ByVal sUTF8 As String ) As String
        Function = ACode$( UCode$( sUTF8 ), %CP_UTF8 )
    End Function

    Leave a comment:


  • Edwin Knoppert
    replied
    This doesn't help as well:

    Code:
    Function UT8TOAnsi( ByVal sUTF8 As String ) As String
        T = UCode$( sUTF8, 1252 ) 
        Function = ACode$( T )
    End Function
    Note that the content of the html being placed directly into a local string works fine.

    Leave a comment:


  • Edwin Knoppert
    started a topic UTF 8 header remains

    UTF 8 header remains

    I have this html i edit with Visual Web Developer and produces an UTF8 document.

    In my PB app i add this html file as RCDATA, parse the <body> and put the content into an iframe (or div) using innerHTML.
    Whatever i do the signs" " remain on the first line!
    These symbols are no longer present in the text and it seems the webcontrol shows them due the format or so.

    I would like to keep the file as it is, converting it to ansi is not really an option.

    Should i convert the resource obtained to ansi or do you have another option?
    Maybe an html doctype change?
Working...
X