Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

non-english

Use regular expression to match ANY Chinese character in utf-8 encoding

May 28, 2023 by Tarik

The regex to match a Chinese (well, CJK) character is \p{script=Han} which can be appreviated to simply \p{Han} This assumes that your regex compiler meets requirement RL1.2 Properties from UTS#18 Unicode Regular Expressions. Perl and Java 7 both meet that spec, but many others do not.

Categories regex Tags flex-lexer, non-english, regex, unicode Leave a comment

Detect strings with non English characters in Python

March 6, 2023 by Tarik

You can just check whether the string can be encoded only with ASCII characters (which are Latin alphabet + some other characters). If it can not be encoded, then it has the characters from some other alphabet. Note the comment # -*- coding: ….. It should be there at the top of the python file … Read more

Categories python Tags non-english, python, regex Leave a comment

Can an email address contain international (non-english) characters?

December 31, 2022 by Tarik

Officially, per RFC 6532 – Yes. For a quick explanation, check out wikipedia on the subject.

Categories email Tags email, internationalization, non-english Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa