Skip to content

Instantly share code, notes, and snippets.

@joar
Created January 15, 2013 22:14
Show Gist options
  • Save joar/4542627 to your computer and use it in GitHub Desktop.
Save joar/4542627 to your computer and use it in GitHub Desktop.
# encoding: utf-8
shrimp_sandwich = u'Räksmörgås'
shrimp_sandwich += '-'
print(shrimp_sandwich)
shrimp_sandwich += raw_input('What\'s shrimp sandwich in Swedish?: ')
# What's shrimp sandwich in Swedish?: Räksmörgås
# ---
# Traceback (most recent call last):
# File "/tmp/shrimp_sandwich.py", line 5, in <module>
# shrimp_sandwich += raw_input('What\'s shrimp sandwich in Swedish?: ')
# UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment