We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given a code chunk
Weave.CodeChunk("\nΝᵢₙ= 2\nNₛₚ= 2\nszᵢₙ= (5,5)\nszₛₚ= (6,9)\n", 1, 0, 16, "", Dict{Symbol,Any}(:dpi=>96,:fig=>true,:fig_pos=>nothing,:out_width=>nothing,:label=>nothing,:eval=>true,:wrap=>true,:fig_env=>nothing,:term=>false,:hold=>false…), "", "", AbstractString[], Weave.ChunkOutput[])
which contains Unicode characters, calling Weave.(chunk,report,Main) causes parsing to stop early:
Weave.(chunk,report,Main)
Weave.CodeChunk("\nΝᵢₙ= 2\nNₛₚ= 2\nszᵢₙ= (5,5)\nszₛₚ= (6,9)\n", 1, 0, 16, "", Dict{Symbol,Any}(:dpi=>96,:fig=>true,:fig_pos=>nothing,:out_width=>"\\linewidth",:label=>nothing,:eval=>true,:wrap=>true,:fig_env=>nothing,:term=>false,:hold=>false…), "", "", AbstractString[], Weave.ChunkOutput[ChunkOutput("Νᵢₙ= 2\n", "", "", "", AbstractString[]), ChunkOutput("Nₛₚ= 2\n", "", "", "", AbstractString[]), ChunkOutput("szᵢₙ= (5,5)\n", "", "", "", AbstractString[])])
This is due to incorrect UTF-8 string handling in https://github.com/mpastell/Weave.jl/blob/master/src/run.jl#L259 UTF-8 strings don't always encode each character in a single byte.
length counts the number of UTF-8 characters in the string, whereas pos as updated by Meta.parse counts the number of bytes. Therefore, https://github.com/mpastell/Weave.jl/blob/master/src/run.jl#L259 should be n = sizeof(input).
length
pos
Meta.parse
n = sizeof(input)
The text was updated successfully, but these errors were encountered:
ea1de0f
Merge pull request #215 from Oblynx/patch-1
df7f0d1
Fix #214
No branches or pull requests
Given a code chunk
which contains Unicode characters, calling
Weave.(chunk,report,Main)
causes parsing to stop early:This is due to incorrect UTF-8 string handling in https://github.com/mpastell/Weave.jl/blob/master/src/run.jl#L259
UTF-8 strings don't always encode each character in a single byte.
length
counts the number of UTF-8 characters in the string, whereaspos
as updated byMeta.parse
counts the number of bytes.Therefore, https://github.com/mpastell/Weave.jl/blob/master/src/run.jl#L259
should be
n = sizeof(input)
.The text was updated successfully, but these errors were encountered: