Menu

#4 file is not created in utf-8

1.0
closed
utf-8 (1)
2020-01-18
2019-12-31
Dmitry
No

Russian letters (Cyrillic) are not displayed, because in Russian Excel, a file is not created in utf-8. I attach the correction.

1 Attachments

Discussion

  • Jeffrey Long

    Jeffrey Long - 2019-12-31

    Dmitry,

    Thank you for bringing this to my attention, and sending the example. I was not able to get the image to render correctly here in the United States on my edition of Excel. I studied your fix and it provided insight. My installation of Excel creates the .gv text file using ANSI encoding, so the Russian characters are already lost before the UTF-8 conversion you added.

    I believe the way for me to fix this is to convert all "Print" statements to write to an ADODB.Stream object which will create a true UTF-8 file from inception. I believe such a change will allow the tool to render images correctly in both (any) countries. See this article for more information.

    https://stackoverflow.com/questions/2524703/save-text-file-utf-8-encoded-with-vba

    If the change works, I must also make the change in several other places such as the Style Designer, and Source worksheets. I am also considering adding the character set as a runtime option within the "Graph" list on the Graphviz ribbon. These changes will take a little time, but I hope to return an updated file to you soon.

    Best regards,
    Jeff

     
  • Jeffrey Long

    Jeffrey Long - 2020-01-05

    Dmitry,

    Attached you will find a revised preadsheet which creates the DOT source file in UTF-8 format.

    The change has been made throughout the tool. In the 'data' worksheet any UTF-8 text in a cell will be used in the DOT file created and sent to Graphviz. In the 'style designer' worksheet you may specify the sample label in non-western text. In the 'source' worksheet the Graphviz source is written to a UTF-8 encoded file when the save source button is used.

    Please contact me again if you have any questions,
    Jeff

     
  • Jeffrey Long

    Jeffrey Long - 2020-01-05
    • status: open --> closed
     
  • Jeffrey Long

    Jeffrey Long - 2020-01-05

    Fix was published on 05-Jan-2020, version 4.5.03.

     
  • Dmitry

    Dmitry - 2020-01-16

    Russian letters (Cyrillic) are displayed correctly (file Relationship Visualizer). Need to fix examples in the "samples" folder.

     
  • Jeffrey Long

    Jeffrey Long - 2020-01-18

    Examples in the "samples" folder have been updated to the UTF-8 macro template as of 18-Jan-2020. The examples are in English but will display correctly if someone wants to translate them to another language.

     

Log in to post a comment.