none
The unknown encoded in emf-EMR_EXTTEXTOUTW-EmrText-OutputString RRS feed

  • Question

  • I extracted EMR_EXTTEXTOUTW elements from an emf file,then extracted  EmrText elements from EMR_EXTTEXTOUTW elements,then extracted  OutputString elements from EmrText elements.according to definition,OutputString's encoded is 16-bit Unicode UTF16-LEcharacters.

    But some   OutputStrings extracted from emf couldn't encode by Unicode UTF16-LE

    compare to pictures by emf,I found some comparisons to this unknown encoded ,"13 00" ->"0","14 00"->"1",but unicode "0"is"30 00","1"is"31 00"

    what is the unknown encode?
    Sunday, April 24, 2016 4:04 AM

All replies

  • eg:

    EmrText

    A8 00 00 00 38 00 00 00 02 00 00 00 4C 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF 50 00 00 00 17 00 13 00 10 00 00 00 00 00 00 00

    and it's OutputString is "40" ,but it's code is "17 00 13 00" ,Is it unicode ? 

    Sunday, April 24, 2016 7:14 AM
  • Did you extract the string according to the value of offString offset from the start of the EMR_EXTTEXTOUTW record?

    Sunday, April 24, 2016 9:35 AM
  • yes,I extracted the string according to the value of offString offset from the start of the EMR_EXTTEXTOUTW record.

    In most cases,I get the correct String successfully and it's code is UTF-16 completely.

    But in some cases,It's code is not Unicode or ASCII,just an unknown encode.It is strange that window system

     can <label>discriminate the unknown encode when i open a emf file as a picture.</label>

    <label>you can see the </label>complete EMR_EXTTEXTOUTW :

    54 00 00 00 58 00 00 00 A8 00 00 00 1E 00 00 00 C5 00 00 00 3D 00 00 00 01 00 00 00 00 00 48 41 22 2B 48 41 A8 00 00 00 38 00 00 00 02 00 00 00 4C 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF 50 00 00 00 17 00 13 00 10 00 00 00 00 00 00 00 

    Sunday, April 24, 2016 10:12 AM
  • Seems that 17 and 13 are indexes of the character glyphs, due to the ETO_GLYPH_INDEX option (https://msdn.microsoft.com/en-us/library/cc231172.aspx) specified in the Options field.

    Sunday, April 24, 2016 10:16 AM
  • But ExtTextOutOptions
    is attribute of   EMR_SMALLTEXTOUT but not EMR_EXTTEXTOUTW.

    The OutputString of EMR_EXTTEXTOUTW 's EmrText  was defined like that:

    The size and encoding of the characters in the OutputString is determined by the type of record that contains the EmrText object, as follows:
     EMR_EXTTEXTOUTA (section 2.3.5.7) and EMR_POLYTEXTOUTA (section 2.3.5.32) records: 8-bit ASCII characters.
     EMR_EXTTEXTOUTW and EMR_POLYTEXTOUTW records: 16-bit Unicode UTF16-LE characters.
    Sunday, April 24, 2016 12:43 PM
  • By the unknown encode,meaning  of "17 00 13 00" is "40",Are they indexes of the character glyphs ?
    Sunday, April 24, 2016 12:57 PM
  • I make a mistake just now.ExtTextOutOptions is an element of EmrText  .I  will try.thx
    Sunday, April 24, 2016 1:49 PM
  • Hi 袁嘉伟,

    What's the problem now?

    https://social.msdn.microsoft.com/Forums/en-US/2c1cbab1-f871-42d3-9b82-90a9fd6e7092/the-unknown-encoded-in-emfemrexttextoutwemrtextoutputstring?forum=os_windowsprotocols

    I see you posted a same issue above, And you have already know the reasons for that. Could you post your solution here? It could be helpful for someone who has the same issue.

    Please also close these thread by marking helpful reply as an answer, thanks for your effort and support.

    Have a nice day!

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 26, 2016 9:16 AM