Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
-- This file: -- http://angg.twu.net/LUA/badchars-unibyte.lua.html -- http://angg.twu.net/LUA/badchars-unibyte.lua -- (find-angg "LUA/badchars-unibyte.lua") -- Author: Eduardo Ochs <eduardoochs@gmail.com> -- Version: 2021aug08 -- -- (defun e () (interactive) (find-angg "LUA/badchars-unibyte.lua")) -- -- Some of my files are still unibyte/raw-text-unix. -- This scripts helps me find the characters that may break in the -- l1..u8 translation. -- -- See: (find-blogme3 "detect-encoding.lua") goodchars_re = "[\t\n\m* -~«»ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜàáâãäåçèéêëìíîïñòóôõöùúûü]" fname = "~/e/lua5.e" -- (find-fline "~/e/lua5.e") fname = "~/.zshrc" -- (find-fline "~/.zshrc") fname = "~/.emacs.papers" -- (find-fline "~/.emacs.papers") fname = "~/.emacs" -- (find-fline "~/.emacs.papers") fname = "~/e/tex.e" -- (find-fline "~/e/tex.e") lines = splitlines(ee_readfile(fname)) for i,line in ipairs(lines) do local line0 = line:gsub(goodchars_re, "") if line0 ~= "" then print(format('(find-fline "%s" %d)', fname, i)) print(line0) end end --[[ * (eepitch-lua51) * (eepitch-kill) * (eepitch-lua51) dofile "badchars-unibyte.lua" --]] -- Local Variables: -- coding: raw-text-unix -- End: