fui icon indicating copy to clipboard operation
fui copied to clipboard

error: invalid byte sequence in UTF-8

Open RunningYoung opened this issue 5 years ago • 24 comments

RunningYoung avatar Jun 05 '19 05:06 RunningYoung

Please provide a file/repro @RunningYoung ? Thanks

dblock avatar Jun 05 '19 11:06 dblock

me too

WeijunDeng avatar Jul 29 '19 05:07 WeijunDeng

me too

jiehailong avatar Aug 14 '19 09:08 jiehailong

me too

zhongqing05 avatar Oct 31 '19 12:10 zhongqing05

error: invalid byte sequence in UTF-8

wujiegoodluck avatar Dec 30 '19 03:12 wujiegoodluck

@wujiegoodluck @zhongqing05 @jiehailong @WeijunDeng someone please add a test with a repro,

dblock avatar Dec 30 '19 14:12 dblock

me too

IDwangluting avatar Jan 03 '20 03:01 IDwangluting

+1

UknowHui avatar Jan 19 '20 09:01 UknowHui

To the next person about to add a +1:

  1. Write a test that reproduces the problem.
  2. Fix the problem.
  3. Submit a PR.

dblock avatar Jan 20 '20 19:01 dblock

me too error: invalid byte sequence in UTF-8

My project has some .rb files , I don't know if it's because of that。

xiaoyaoknight avatar Apr 17 '20 08:04 xiaoyaoknight

@xiaoyaoknight Can you please post a file at least with which this can be reproduced?

dblock avatar Apr 17 '20 13:04 dblock

Checking derivedData/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ZHTableview.build/DerivedSources/ZHTableview-Swift.h ... Checking derivedData/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ZHTableview.build/Objects-normal/x86_64/ZHTableview-Swift.h ... Checking derivedData/Build/Intermediates.noindex/PrecompiledHeaders/DDMall-Bridging-Header-swift_3K0PQHEOM6MA9-clang_2A97GP9MCLM9K.pch ... error: invalid byte sequence in UTF-8

@dblock My project is swift and oc mixed mode, the project directory execution fui -v find reported this error

wuyj avatar Apr 25 '20 02:04 wuyj

@wuyj Can you please upload the last file, derivedData/Build/Intermediates.noindex/PrecompiledHeaders/DDMall-Bridging-Header-swift_3K0PQHEOM6MA9-clang_2A97GP9MCLM9K.pch somewhere (or add a unit test with this file and PR it)?

dblock avatar Apr 25 '20 17:04 dblock

Let me end this thread. This is caused by the non-UTF-8 encoding system, such as GB18013 which may be default Chinese Encoding System on Windows. You should reopen those files with the correct encoding system and then save it in UTF-8.

Don't know how to solve it with code. @dblock

编码错了,这些有问题的文件都是 GB18013 格式的,手动转成 UTF-8 就好了,具体是哪个文件用 --verbose 看,转的话 VSCode 就可以。转完了再跑就行了

Sample files:

SampleFiles.zip

tepmnthar avatar Aug 05 '20 11:08 tepmnthar

@tepmnthar I can take a stab at adding support for this in fui. I think we should at least handle the error gracefully by showing which file is problematic. We could also detect what encoding the file is in. Turn your sample into a spec to start?

dblock avatar Aug 05 '20 14:08 dblock

Glad to hear that! @dblock It's difficult for me to write a long paragraph in English. It may cause misunderstanding. Would help if you need to translate it to Chinese.

tepmnthar avatar Aug 07 '20 07:08 tepmnthar

me too

elderJiang avatar Oct 16 '20 06:10 elderJiang

QR_Encode.h.zip @dblock this file causes error: invalid byte sequence in UTF-8

siyou325 avatar Dec 16 '20 06:12 siyou325

@siyou325 Thanks, please turn this into a spec and a fix.

dblock avatar Dec 16 '20 14:12 dblock

@dblock I'm sorry for that i can't help you,because i just try fui and found this error😊

siyou325 avatar Dec 17 '20 11:12 siyou325

I also encountered the same problem, is there a solution?

doubleJJJJ avatar Aug 06 '21 09:08 doubleJJJJ

Let me end this thread. This is caused by the non-UTF-8 encoding system, such as GB18013 which may be default Chinese Encoding System on Windows. You should reopen those files with the correct encoding system and then save it in UTF-8.

Don't know how to solve it with code. @dblock

编码错了,这些有问题的文件都是 GB18013 格式的,手动转成 UTF-8 就好了,具体是哪个文件用 --verbose 看,转的话 VSCode 就可以。转完了再跑就行了

Sample files:

SampleFiles.zip

这个这个问题现在是怎么解决呢?

doubleJJJJ avatar Aug 06 '21 09:08 doubleJJJJ