encode of a string

Hi, is it possible to know the encode of a string in cobol?

  • 0  

    Can you provide more detail on what you would like to do? Is this data from a file that you are reading?

    Visual COBOL supports ASCII and EBCDIC character sets for storing alphanumeric data and PIC N for UTF-16 and PIC U for UTF-8 characters.

    I don't know of a way to determine the type of encoding for a random string of characters...

    Chris Glazier
    Rocket Software - Principal Technical Support Specialist
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • 0 in reply to   

    Hi, Chris.

    We don't read a file, the text is transferred from a Windows server in a buffer text and stored in a working variable, then inserted into a utf8-encoded database.

    The problem is that , when we do the insert of a text with tilde (accent), the Db magager returns us an error.

    whe found the function cbl_string_convert to force the encoding to UTF-8,but the function needs the in-encodig and we don´t know it.

    so , we need a way to know the in-encodig of the buffer text