Write your code using utf-8
1 # -*- coding: utf-8 -*-
Add this line at the beginning of your code. Python won't complain anymore about non-ascii characters in your code.
13498 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
1 # -*- coding: utf-8 -*-
1 2 private class RefreshAction extends AbstractAction { 3 4 private RefreshAction() { 5 super("Refresh\u2026"); 6 } 7 8 public void actionPerformed(ActionEvent e) { 9 ... 10 } 11 }
1 2 …
1 2 s = "hello normal string" 3 u = unicode(s, "utf-8") 4 backToBytes = u.encode("utf-8")
1 2 s = '' # my thai name 3 t = s.decode('cp874') # same as unicode(..) 4 appuifw.note(t, 'info')