Thema: Unicode fails

Einzelnen Beitrag anzeigen

Benutzerbild von Gausi
Gausi

Registriert seit: 17. Jul 2005
900 Beiträge
 
Delphi 11 Alexandria
 
#8

AW: Unicode fails

  Alt 2. Dez 2020, 20:22
Bist du dir sicher, dass du UTF-16 meinst und nicht UCS-2?
Ähm ... nein. Aber ich habe grade noch mal in den ID3-Tag-Standard auf id3.org geschaut. Für Version ID3Tag 2.3 gilt
Zitat:
All Unicode strings use 16-bit unicode 2.0 (ISO/IEC 10646-1:1993, UCS-2).
Für Version 2.4 gilt:
Zitat:
Frames that allow different types of text encoding contains a text encoding description byte. Possible encodings:
  • $00 ISO-8859-1 [ISO-8859-1]. Terminated with $00.
  • $01 UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM. All strings in the same frame SHALL have the same byteorder. Terminated with $00 00.
  • $02 UTF-16BE [UTF-16] encoded Unicode [UNICODE] without BOM. Terminated with $00 00.
  • $03 UTF-8 [UTF-8] encoded Unicode [UNICODE]. Terminated with $00.
Ob das nun wirklich genau so von den üblichen Libraries umgesetzt ist, weiß ich nicht. Nach meiner Erfahrung würde ich wetten: Ne.

Tatsächlich gibt es auch inoffizielle Mischformen der beiden Versionen, und für die ISO-8859-x Variante habe ich eine Heuristik, die ggf. das "x" aus dem Dateinamen versucht zu schätzen - denn das ist längst nicht immer ISO-8859-1.

(Du hast nicht zufällig ein paar Testfiles dazu irgendwo rumliegen? Zusammen mit Screenshots, wie der Text richtig aussähe? )
Being smart will count for nothing if you don't make the world better. You have to use your smarts to count for something, to serve life, not death.
  Mit Zitat antworten Zitat