We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8592b54 commit bc673bcCopy full SHA for bc673bc
pygmt/helpers/utils.py
@@ -233,6 +233,10 @@ def non_ascii_to_octal(argstr):
233
>>> non_ascii_to_octal("ABC ±120° DEF α ♥")
234
'ABC \\261120\\260 DEF @~\\141@~ @%34%\\252@%%'
235
""" # noqa: RUF002
236
+ # Return the string if it only contains printable ASCII characters from 32 to 126.
237
+ if all(32 <= ord(c) <= 126 for c in argstr):
238
+ return argstr
239
+
240
# Dictionary mapping non-ASCII characters to octal codes
241
mapping = {}
242
0 commit comments