Viewed 76k times. Improve this question. Csa77 10 10 silver badges 18 18 bronze badges. Ian Dickinson Ian Dickinson Add a comment. Active Oldest Votes. Improve this answer. Richard Gomes 5, 1 1 gold badge 36 36 silver badges 46 46 bronze badges.
Torsten Marek Torsten Marek In older versions of iconv, like that on OSX or in fink, there is no -o flag. Redirecting stdout should always work, however. Torsten, thanks this works perfectly on my linux machine. I couldn't find a version of iconv utility for cygwin, but that's not a showstopper.
If any character in the input is not supported by that encoding, a "cannot convert" or "illegal input sequence" error will be emitted, even if the input is valid UTF Show 1 more comment.
Use python and str. Roger Dahl Roger Dahl AShelly AShelly Binyamin: Yes, it does recode. That would abort the output when encountering invalid data. Git stats 93 commits. Failed to load latest commit information. View code. Use from the Command Line You can either download the application from here or build from the source code. BSDClause License. Releases 1 tags. Packages 0 No packages published. Contributors 5. You signed in with another tab or window. Active 10 years, 5 months ago.
Viewed 2k times. Improve this question. Community Bot 1 1 1 silver badge. MetaMagnate MetaMagnate 41k 66 66 gold badges silver badges bronze badges. I guess that it is not possible to seriously validate a file to be utf-8, since everything could be utf-8 even if the text doesn't make any sense for a human being.
Well when I opened one of the XML files in TextWrangler it gave me an error message saying that there was some invalid characters that did not meet the specified UTF-8 formatting, so apparently it knows.. Add a comment. Active Oldest Votes. Improve this answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
0コメント