Closed xiuweihan closed 7 months ago
The names do look good to me. Are they wrong?
I'm having trouble with my hard disc, with constant corruptions. Will need some time
oda converts them to these layers, the logs do contain the same encodings.
0 区域-green area PV ARRAY LIMIT site 区域 E-SUBSTATION E-INVERTER_STATION 区域-道路 *ADSK_SYSTEM_LIGHTS DGX GstarFastview4.2-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-note-layer-HCNoteLayer ZAW
They still do look very chinese to me. which makes sense, since the codepage is ANSI_936 Simplified Chinese.
And dwglayers does look right:
programs/dwglayers ../ti/gh945/read_layer_name.dwg 0 区域-green area PV ARRAY LIMIT site 区域 E-SUBSTATION E-INVERTER_STATION 区域-道路 *ADSK_SYSTEM_LIGHTS DGX GstarFastview4.2-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-note-layer-HCNoteLayer ZAW
So it looks like your console codepage does not display UTF-8 correctly.
Hi, I've encountered the same problem recently, as rurban says, the program or the library itself is correct, the problem is from codepage of your default console,
add line of : system("chcp 65001") at the begins of mian() works for me.
The library was not quite correct, just found a major decoding problem: #959 But this should not affect you in this case.
Use dwglayers.exe: libredwg-0.13.3-win64.zip to output the layer names of the dwg file. Some layers contain Chinese characters and garbled characters are output.
file: read_layer_name.zip
result: 0 鍖哄煙-green area PV ARRAY LIMIT site 鍖哄煙 E-SUBSTATION E-INVERTER_STATION 鍖哄煙-閬撹矾 *ADSK_SYSTEM_LIGHTS DGX GstarFastview4.2-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-note-layer-HCNoteLayer ZAW