Skip to content

Error if title UTF8String #535

@Kvaz1r

Description

@Kvaz1r

When I try set title as UTF8String, for example:
plot(rand(20),rand(20),title="тест")

get next error:

Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: BoundsError: attempt to access 4-element Array{UInt8,1}:
 0xd1
 0x82
 0xd0
 0xb5
  at index [5]
 in setindex! at array.jl:313
 in latin1 at E:\Julia\JPackages\v0.4\GR\src\GR.jl:317
 in gr_text at E:\Julia\JPackages\v0.4\Plots\src\backends/gr.jl:175
 in gr_display at E:\Julia\JPackages\v0.4\Plots\src\backends/gr.jl:628
 in gr_display at E:\Julia\JPackages\v0.4\Plots\src\backends/gr.jl:455
 in _display at E:\Julia\JPackages\v0.4\Plots\src\backends/gr.jl:990
 in display at E:\Julia\JPackages\v0.4\Plots\src\output.jl:112
 in display at REPL.jl:117
 [inlined code] from multimedia.jl:151
 in display at multimedia.jl:163
 in print_response at REPL.jl:134
 in print_response at REPL.jl:121
 in anonymous at REPL.jl:624
 in run_interface at LineEdit.jl:1610
 in run_frontend at REPL.jl:863
 in run_repl at REPL.jl:167
 in _start at client.jl:420

if used
plot(rand(20),rand(20),title=b"тест")
work correctly.

I use julia version 0.4.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions