chatgpt_macro_for_texstudio
chatgpt_macro_for_texstudio copied to clipboard
Problem with unicode character
Hi there,
thanks for providing this nice macro for TeXstudio. I use it in combination with LuaLaTeX, where unicode character are allowed. This sometimes lead to chatgpt answers with unicode characters, that cannot be printed. The error message looks like this:
Traceback (most recent call last): File "D:\Programme\TeXstudio Settings\openai_python_script.py", line 39, in <module> print(content, end='', flush=True) File "C:\Program Files\Python39\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u0394' in position 0: character maps to
Is there anything you can do about? Unfortunately, I did not figure a way out to resolve this. Cheers Niklas