LoginSignup
8
4

More than 5 years have passed since last update.

Slackのファイル共有を利用するとBOMが消える

Posted at

会社でSlackを経由してファイル共有すると、
BOM付きファイルからBOMが消える事件を見かけたので、自分でも再現するか試してみる。

動作環境

2018年10月30日時点でのChrome経由でのSlack

手順

BOM付きファイル作成

$ cat <(printf "\xEF\xBB\xBF sample text.") > BomTest.txt
$ file BomTest.txt
BomTest.txt: UTF-8 Unicode (with BOM) text, with no line terminators

Slackにテキストをアップロード

スクリーンショット 2018-10-30 8.00.40.png

Slackにアップロードしたテキストをダウンロード

スクリーンショット 2018-10-30 8.01.21.png

ダウンロードしたファイルのBOMを確認

$ file  ~/Downloads/BomTest.txt
/Volumes/MHDD/Users/mitsuaki1229/Downloads/BomTest.txt: ASCII text, with no line terminators

ASCIIに変換されてる...🤔

感想

Excelのために、BOM付きUTF-8で文字化けしないCSVを作成してる場合、共有方法には気をつけよう。

8
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
4