It's all about the answers!

Ask a question

File could not be read with the encoding specified?


Makson Lee (41044241) | asked May 11 '12, 9:14 a.m.
Tried to check in some text files, but got following message, why?


The file(s) to be checked-in could not be read with the encoding specified.

Select the files to be treated as binary. If you decide later it is not binary, you can change the line delimiter property of the file.

4 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered May 11 '12, 2:58 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The "encoding" on a file determines how you map the series of bits in the file into logical characters in the character set. For some encodings, there is no mapping for a particular series of bits, and apparently RTC has encountered such a series of bits. This usual means that the encoding that is declared for the file does not match the encoding that was actually used to write the file.

The error message advice to declare the file as "binary" will fix this problem by telling RTC not to try to decode the bits ... just read them in directly as binary bits.

Cheers,
Geoff

Tried to check in some text files, but got following message, why?


The file(s) to be checked-in could not be read with the encoding specified.

Select the files to be treated as binary. If you decide later it is not binary, you can change the line delimiter property of the file.

permanent link
Makson Lee (41044241) | answered May 12 '12, 3:41 a.m.
Declare a text file as "binary"? Will we then lose some functionality? Something like merge for line?

The error message advice to declare the file as "binary" will fix this problem by telling RTC not to try to decode the bits ... just read them in directly as binary bits.

permanent link
Joseph Chang (1552319) | answered May 12 '12, 11:32 a.m.
Declare a text file as "binary"? Will we then lose some functionality? Something like merge for line?

Makson,

Which encoding is set for the file failed to check-in? Big5 or UTF-8?
I believe at least one byte violate the encoding rule in this file.

permanent link
Makson Lee (41044241) | answered May 13 '12, 4:09 a.m.
Joseph,

The file is encoded as Western European (Windows), and maybe you could let me know how to find bits which violate the encoding.

Which encoding is set for the file failed to check-in? Big5 or UTF-8?
I believe at least one byte violate the encoding rule in this file.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.