Windows NTは初代からUnicodeがネイティブの文字コードです。cp932ではありません。
プログラマーなら一度は煩わされたことのある文字コードについてのスレ。
UTF-8、Shift_JIS、JIS、EUC、Unicode、UCS、サロゲートペア、コードポイント、文字コード判定、
合成文字、ソート、TRON、外字コード、その他について語り合いましょう。
各言語での文字列の扱いについての質問もOKです。
基本マッターリ、ささ、茶でもどうぞ。
■過去スレ
文字コード総合スレ part1 http://pc11.2ch.net/test/read.cgi/tech/1031028205/
文字コード総合スレ part2 http://pc11.2ch.net/test/read.cgi/tech/1143375639/
文字コード総合スレ part3 http://pc11.2ch.net/test/read.cgi/tech/1180250376/
文字コード総合スレ part4 http://pc11.2ch.net/test/read.cgi/tech/1228052369/
(スレ再利用)UnicodeとUTF-8の違いは? http://pc12.2ch.net/test/read.cgi/tech/1177930957/
(隔離スレ)UnicodeとUTF-8の違いは? その2 http://pc12.2ch.net/test/read.cgi/tech/1274937437/
文字コード総合スレ part5 http://pc12.2ch.net/test/read.cgi/tech/1236529563/
文字コード総合スレ part6 http://hibari.2ch.net/test/read.cgi/tech/1278923059/
文字コード総合スレ part7 http://toro.2ch.net/test/read.cgi/tech/1306595564/
文字コード総合スレ part8 http://peace.2ch.net/test/read.cgi/tech/1354248962/
文字コード総合スレ part9 http://peace.2ch.net/test/read.cgi/tech/1401301779/
文字コード総合スレ Part10 http://mevius.2ch.net/test/read.cgi/tech/1444822140/
文字コード総合スレ Part11 https://mevius.5ch.net/test/read.cgi/tech/1516629503/
文字コード総合スレ Part12 https://mevius.5ch.net/test/read.cgi/tech/1544931495/
文字コード総合スレ part13
https://mevius.5ch.net/test/read.cgi/tech/1593777227/
探検
文字コード総合スレ part14
■ このスレッドは過去ログ倉庫に格納されています
2023/03/03(金) 15:46:58.08ID:yKqwMGHT
2023/03/03(金) 18:50:36.86ID:GXuOSZhF
乙
2023/03/04(土) 05:49:15.61ID:USGrlhof
Q. UTF-8 に BOM をつけるべきですか?
A. Unocode Standard では「付けたければ付けても良いが、付ける必要はないし、付けるのはお勧めしない」と規定されています。
A. Unocode Standard では「付けたければ付けても良いが、付ける必要はないし、付けるのはお勧めしない」と規定されています。
2023/03/04(土) 11:03:14.60ID:RFNVa0Qi
>>1
>Windows NTは初代からUnicodeがネイティブの文字コードです。cp932ではありません。
filesystem の文字コードと system locale についても詳しく
あとファイル名に BOM 必要かどうかも
>Windows NTは初代からUnicodeがネイティブの文字コードです。cp932ではありません。
filesystem の文字コードと system locale についても詳しく
あとファイル名に BOM 必要かどうかも
2023/03/04(土) 11:35:06.58ID:vwOVzejx
>>3
訳し方でニュアンスが変わるから根拠となる規格の原文も載せた方が良いぞ
訳し方でニュアンスが変わるから根拠となる規格の原文も載せた方が良いぞ
2023/03/04(土) 20:52:22.05ID:Uzl83FOV
UTF-8, UTF-16, UTF-32 & BOM
https://unicode.org/faq/utf_bom.html
「付けたければ付けても良いが、付ける必要はないし、付けるのはお勧めしない」なんてどこにも書いてないんだが
https://unicode.org/faq/utf_bom.html
「付けたければ付けても良いが、付ける必要はないし、付けるのはお勧めしない」なんてどこにも書いてないんだが
2023/03/04(土) 23:54:57.70ID:q+Tu7Jlx
2023/03/05(日) 00:42:43.70ID:lXlBYG2e
>>3
何で規定されてんの?
何で規定されてんの?
2023/03/05(日) 01:11:17.97ID:JF7lH/t4
>>6
Unicode Standard を嫁。
Unicode Standard を嫁。
2023/03/05(日) 01:17:14.07ID:JF7lH/t4
>>8
規格に理由は書かれてない。
規格書では趣旨として UTF-8 では Unicode をASCII互換にするための方式みたいな説明してるので、BOM をつけると ASCII互換性が崩れるのが駄目なのかもしれない。違うかもしれない。
規格に理由は書かれてない。
規格書では趣旨として UTF-8 では Unicode をASCII互換にするための方式みたいな説明してるので、BOM をつけると ASCII互換性が崩れるのが駄目なのかもしれない。違うかもしれない。
2023/03/05(日) 10:21:41.04ID:uw77rwIl
すまそ。ここの40ページにUTF-8でBOMが許可されるって書いてあった
https://www.unicode.org/versions/Unicode15.0.0/UnicodeStandard-15.0.pdf
Table 2-4. The Seven Unicode Encoding Schemes
Encoding Scheme: UTF-8
Endian Order: N/A
BOM Allowed?: yes
https://www.unicode.org/versions/Unicode15.0.0/UnicodeStandard-15.0.pdf
Table 2-4. The Seven Unicode Encoding Schemes
Encoding Scheme: UTF-8
Endian Order: N/A
BOM Allowed?: yes
2023/03/05(日) 10:24:42.19ID:Dqp2Pk7H
The Unicode® Standard Version 15.0 – Core Specification
https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf
When converting between different encoding schemes, extreme care must be taken in handling any initial byte order marks.
For example, if one converted a UTF-16 byte serialization with an initial byte order mark to a UTF-8 byte serialization, thereby converting the byte order mark to <EF BB BF> in the UTF-8 form, the <EF BB BF> would now be ambiguous as to its status as a byte order mark (from its source) or as an initial zero width no break space.
If the UTF-8 byte serialization were then converted to UTF-16BE and the initial <EF BB BF> were converted to <FE FF>, the interpretation of the U+FEFF character would have been modified by the conversion.
This would be nonconformant behavior according to conformance clause C7, because the change between byte serializations would have resulted in modification of the interpretation of the text.
This is one reason why the use of the initial byte sequence <EF BB BF> as a signature on UTF-8 byte sequences is not recommended by the Unicode Standard.
https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf
When converting between different encoding schemes, extreme care must be taken in handling any initial byte order marks.
For example, if one converted a UTF-16 byte serialization with an initial byte order mark to a UTF-8 byte serialization, thereby converting the byte order mark to <EF BB BF> in the UTF-8 form, the <EF BB BF> would now be ambiguous as to its status as a byte order mark (from its source) or as an initial zero width no break space.
If the UTF-8 byte serialization were then converted to UTF-16BE and the initial <EF BB BF> were converted to <FE FF>, the interpretation of the U+FEFF character would have been modified by the conversion.
This would be nonconformant behavior according to conformance clause C7, because the change between byte serializations would have resulted in modification of the interpretation of the text.
This is one reason why the use of the initial byte sequence <EF BB BF> as a signature on UTF-8 byte sequences is not recommended by the Unicode Standard.
2023/03/05(日) 10:24:58.61ID:dEWQ/p/B
■ このスレッドは過去ログ倉庫に格納されています
ニュース
- 中国・ロシア両軍の爆撃機が東京方面へ向かう「異例のルート」を共同飛行…核も搭載可能、連携して威嚇か ★3 [ぐれ★]
- 【沖縄】宮古島で陸自防災訓練に抗議した団体、「恫喝された」と駐屯地トップ厳正捜査求め署名運動 「市民弾圧と戦争への道を…」 [少考さん★]
- 京都のホテル大幅値下げ 訪日中国人客、年1000万人目前で急ブレーキ [蚤の市★]
- 「今の女性はルッキズム」は本当なのか? 若い世代が結婚相手に求める"本当の条件" [少考さん★]
- 高市首相の答弁書に「台湾有事答えない」と明記 存立危機発言当時 ★9 [蚤の市★]
- 「中国人の訪日熱は冷めた」 人気旅行先から日本外れる 14日で自粛呼びかけ1カ月 ★3 [蚤の市★]
- 【実況】博衣こよりのえちえちドラクエ1&2リメイク🧪
- 鈴木農水大臣「440円分の買い物ができる500円のお米券を477円で販売するのでみんな買ってね😉」 [931948549]
- なんか面白いゲームないか?
- 【朗報】 日本人さん、経験し理解する 今の政府は絶対に助けてくれない [303493227]
- 『ゼルダの伝説 風のタクト』が発売された日。“猫目リンク”と美しい大海原を冒険する、初めてのトゥーンレンダリング『ゼルダ』に世界が騒然 [303493227]
- クリスマスが今年も
