UTF_16 question

Liste des GroupesRevenir à cl python 
Sujet : UTF_16 question
De : nospam (at) *nospam* please.ty (jak)
Groupes : comp.lang.python
Date : 27. Apr 2024, 19:45:35
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v0jh4g$h14g$1@dont-email.me>
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.2
Hi everyone,
one thing that I do not understand is happening to me: I have some text
files with different characteristics, among these there are that they
have an UTF_32_le coding, utf_32be, utf_16_le, utf_16_be all of them
without BOM. With those utf_32_xx I have no problem but with the
UTF_16_xx I have. If I have an utf_16_le coded file and I read it with
encoding='utf_16_le' I have no problem I read it, with
encoding='utf_16_be' I can read it without any error even if the data I
receive have the inverted bytes. The same thing happens with the
utf_16_be codified file, I read it, both with encoding='utf_16_be' and
with 'utf_16_le' without errors but in the last case the bytes are
inverted. What did I not understand? What am I doing wrong?
thanks in advance

Date Sujet#  Auteur
27 Apr 24 * UTF_16 question5jak
27 Apr 24 +* Re: UTF_16 question2Stefan Ram
28 Apr 24 i`- Re: UTF_16 question1jak
29 Apr 24 `* Re: UTF_16 question2Richard Damon
1 May 24  `- Re: UTF_16 question1jak

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal