![]() The syntax of find might preclude it from being within a for loop. I've no idea if this actually works so I certainly wouldn't run it from anything but the least important directory you have (make a testing folder with some known ASCII files in). I've just used the or operator \| fqfn="/my/fully/qualified/filename" I'd really appreciate it if someone points out how to use hex values in a range expression. It's an ugly line, so look away now if regular expressions scare you :) I know sed (a bit, via a Win32 port), so I've managed to cobble together a RegEx pattern which finds these offending bytes. if the first byte (of a UTF-8 codepoint) is between 0x80 and 0xBF (reserved for additional bytes), or greater than 0xF7 ("overlong form"), that is considered an error.but an ASCII file is 100% UTF-8 compliant.Īs I mentioned in a comment below, the test for an invalid first byte of a UTF-8 codepoint is: The file command was not suitable, because it identified my example file as ASCII. I've worked out a rough and ready way to identify the problem files. ![]() I've left it here, because is may be of some general use to someone. ** NB: ** I now consider the following Update to be partially irrelevent, because the "problem" files aren't the "problem" (see my answer below). this old-world text mayhem was actually the final straw which brought me over to Ubuntu. Is there a batch converting tool to convert these files to UTF-8? Is there a way to scan the file system to identify these problem files? For this point (1), see my answer, below. Is there some way the gedit can be told to recoginze this code-page? (I believe this code-page still has international variants). I assume that gvim is making a "smart" assumption about the code-page. Gvim has no problem opening these files, but gedit fails to do so. Many of them use a whacky default Windows code-page, which is neither ASCII (7 bits) nor UTF-8. Self._internal_set_property("state", frozenset(curr))įile "/usr/lib64/python3.7/site-packages/xpra/gtk_common/gobject_util.py", line 43, in _internal_set_propertyįile "/usr/lib64/python3.7/site-packages/xpra/x11/models/base.I have a lot of plain text files which come from a Windows environment. Self._state_remove("_NET_WM_STATE_HIDDEN")įile "/usr/lib64/python3.7/site-packages/xpra/x11/models/base.py", line 479, in _state_remove Return do_run_server(error_cb, opts, mode, xpra_file, extra_args, desktop_display)įile "/usr/lib64/python3.7/site-packages/xpra/scripts/server.py", line 907, in do_run_serverįile "/usr/lib64/python3.7/site-packages/xpra/server/server_core.py", line 429, in runįile "/usr/lib64/python3.7/site-packages/xpra/server/gtk_server_base.py", line 120, in do_runįile "/usr/lib64/python3.7/site-packages/gi/overrides/Gtk.py", line 1630, in mainįile "/usr/lib64/python3.7/site-packages/xpra/x11/server.py", line 1010, in _process_configure_windowĬhanges = self._set_window_state(proto, wid, window, packet)įile "/usr/lib64/python3.7/site-packages/xpra/x11/server.py", line 857, in _set_window_stateįile "/usr/lib64/python3.7/site-packages/xpra/x11/models/base.py", line 293, in _sync_iconic Return run_server(error_cb, options, mode, script_file, args, current_display)įile "/usr/lib64/python3.7/site-packages/xpra/scripts/server.py", line 341, in run_server Return run_mode(script_file, err, options, args, mode, defaults)įile "/usr/lib64/python3.7/site-packages/xpra/scripts/main.py", line 451, in run_mode Window_state_updated(.) state updates: ) on 0xa000f8įile "/usr/lib64/python3.7/site-packages/xpra/scripts/main.py", line 115, in main
0 Comments
Leave a Reply. |