Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation on how to use unicode #543

Closed
gunthercox opened this issue Dec 30, 2016 · 1 comment
Closed

Add documentation on how to use unicode #543

gunthercox opened this issue Dec 30, 2016 · 1 comment

Comments

@gunthercox
Copy link
Owner

gunthercox commented Dec 30, 2016

It would be useful to have some documentation on how to use unicode encoding in Python and how troubleshoot unicode errors and warnings. ChatterBot's domain involves working with string type data and a variety of unicode-related questions come up frequently.

@vkosuri
Copy link
Collaborator

vkosuri commented Dec 30, 2016

@gunthercox a useful tag,

I want share some of my thoughts here, If i found unicode issues how i resolved those issues

Recommended use virtual environments for python2 and python3.

python2

virtualenv venv
source venv/bin/activate
python chatterbot-example.py

python3

python3 -m venv /path/to/new/virtual/environment
source venv/bin/activate
python chatterbot-example.py
  1. Learn the differences between Python 2 & 3
  2. Use Futurize (or Modernize) to update your code (e.g. pip install future)
  3. Use Pylint to help make sure you don’t regress on your Python 3 support (pip install pylint)
  4. Use caniusepython3 to find out which of your
  5. Consider using optional static type checking to make sure your type usage works in both Python 2 & 3 (e.g. use mypy to check your typing under both Python 2 & Python 3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants