Generate random UTF-8 string in Python

后端 未结 8 1425
清酒与你
清酒与你 2020-12-09 08:38

I\'d like to test the Unicode handling of my code. Is there anything I can put in random.choice() to select from the entire Unicode range, preferably not an external module?

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 09:09

    Answering revised question:

    Yes, on a strict definition of "control characters" -- note that you won't include CR, LF, and TAB; is that what you want?

    Please consider responding to my earlier invitation to tell us what you are really trying to do.

提交回复
热议问题