Skip to content

Instantly share code, notes, and snippets.

@pupca
Last active December 15, 2015 19:49
Show Gist options
  • Select an option

  • Save pupca/5313992 to your computer and use it in GitHub Desktop.

Select an option

Save pupca/5313992 to your computer and use it in GitHub Desktop.
# coding: utf-8
def kamenicky_to_utf(string)
out = ""
highchars = "üéďäĎŤčěĚĹÍľĺÄÁÉžŽôöÓůÚýÖÜŠĽÝŘťáíóúňŇŮÔšřŕŔ¼§«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■"
string.each_byte do |byte|
if byte < 128
out += byte.chr
else
out += highchars[byte-129]
end
end
return out
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment