Skip to content

rt: Keep ASCII Codes (included extended) i.e. 32-126 & 128-255 #108

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion JsonConverter.bas
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,10 @@ Private Function json_Encode(ByVal json_Text As Variant) As String
Case 9
' tab -> 9 -> \t
json_Char = "\t"
Case 0 To 31, 127 To 65535
Case 0 To 31, 127, 256 To 65535
' Non-ascii characters -> convert to 4-digit hex
' Keep ASCII Codes (included extended) i.e. 32-126 & 128-255
' http://www.asciitable.com/
json_Char = "\u" & VBA.Right$("0000" & VBA.Hex$(json_AscCode), 4)
End Select

Expand Down