https://github.com/bunji2/utf16
memo of utf16 decoding
https://github.com/bunji2/utf16
golang utf-16 utf16
Last synced: about 1 year ago
JSON representation
memo of utf16 decoding
- Host: GitHub
- URL: https://github.com/bunji2/utf16
- Owner: bunji2
- License: mit
- Created: 2019-03-18T13:59:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-18T14:27:35.000Z (about 7 years ago)
- Last Synced: 2025-04-11T04:42:13.771Z (about 1 year ago)
- Topics: golang, utf-16, utf16
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# utf16
Memo of utf16 decoding with GoLang
# building
```
cd sample
go build -o sample.exe
```
# Example
```
C:\work\utf16>sample.exe u16le.txt
FF,FE,49,00,74,00,27,00,73,00,20,00,62,00,65,00,74,00,74,00,65,00,72,00,20,00,74,00,6F,00,20,00,62,00,75,00,72,00,6E,00,20,00,6F,00,75,00,74,00,20,00,74,00,68,00,61,00,6E,00,20,00,74,00,6F,00,20,00,66,00,61,00,64,00,65,00,20,00,61,00,77,00,61,00,79,00,2E,00,0D,00,0A,00,0D,00,0A,00,60,30,93,30,60,30,93,30,88,6D,48,30,66,30,44,30,4F,30,88,30,8A,30,CA,4E,C3,71,48,30,3D,5C,4D,30,8B,30,B9,65,4C,30,44,30,44,30,02,30,
[It's better to burn out than to fade away.
だんだん消えていくより今燃え尽きる方がいい。]
C:\work\utf16>sample.exe u16be.txt
FE,FF,00,49,00,74,00,27,00,73,00,20,00,62,00,65,00,74,00,74,00,65,00,72,00,20,00,74,00,6F,00,20,00,62,00,75,00,72,00,6E,00,20,00,6F,00,75,00,74,00,20,00,74,00,68,00,61,00,6E,00,20,00,74,00,6F,00,20,00,66,00,61,00,64,00,65,00,20,00,61,00,77,00,61,00,79,00,2E,00,0D,00,0A,00,0D,00,0A,30,60,30,93,30,60,30,93,6D,88,30,48,30,66,30,44,30,4F,30,88,30,8A,4E,CA,71,C3,30,48,5C,3D,30,4D,30,8B,65,B9,30,4C,30,44,30,44,30,02,
[It's better to burn out than to fade away.
だんだん消えていくより今燃え尽きる方がいい。]
```