Options

See special characters in a BLOB field.

Hi,

Is there any way to see special characters, like ú, í, é... on a BLOB field in NAV?
I'm using NAV 2018. Trying to display these kind of characters in "User Task" table on the Description BLOB field.

Best Answer

  • Options
    chachitano@hotmail.comchachitano@hotmail.com Member Posts: 8
    Answer ✓
    Thank you for that, it seems like it's sorted... The user task BLOB uses a variable named "MultiLineTextControl" which was pointing to UTF8 on Codeunit 10:

    [External] WriteBlob(VAR BlobFieldRef : FieldRef;NewContent : Text) : Boolean
    BlobFieldRef.CALCFIELD;
    TempBlob.Blob.CREATEOUTSTREAM(OutStream,TEXTENCODING::UTF8);
    OutStream.WRITE(NewContent);
    BlobFieldRef.VALUE := TempBlob.Blob;

    EXIT(TRUE);


    I cloned the function in order to use TEXTENCODING::Windows in a customized one.

Answers

  • Options
    NavNabNavNab Member Posts: 181
    Have you tried something like this?
    TempBlob.WriteAsText('éàîï', TEXTENCODING::UTF8);
    
    MESSAGE('%1', TempBlob.ReadAsText('', TEXTENCODING::UTF8));
    
  • Options
    chachitano@hotmail.comchachitano@hotmail.com Member Posts: 8
    Answer ✓
    Thank you for that, it seems like it's sorted... The user task BLOB uses a variable named "MultiLineTextControl" which was pointing to UTF8 on Codeunit 10:

    [External] WriteBlob(VAR BlobFieldRef : FieldRef;NewContent : Text) : Boolean
    BlobFieldRef.CALCFIELD;
    TempBlob.Blob.CREATEOUTSTREAM(OutStream,TEXTENCODING::UTF8);
    OutStream.WRITE(NewContent);
    BlobFieldRef.VALUE := TempBlob.Blob;

    EXIT(TRUE);


    I cloned the function in order to use TEXTENCODING::Windows in a customized one.
Sign In or Register to comment.