Skip to content
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

Help/documentation for ÷= is broken #41589

Closed
louie-github opened this issue Jul 15, 2021 · 1 comment · Fixed by #41594
Closed

Help/documentation for ÷= is broken #41589

louie-github opened this issue Jul 15, 2021 · 1 comment · Fixed by #41594

Comments

@louie-github
Copy link

louie-github commented Jul 15, 2021

When running ?÷= in the REPL, the lookup fails with this error:

help?> ÷=
ERROR: LoadError: StringIndexError: invalid index [2], valid nearby indices [1]=>'÷', [3]=>'='
Stacktrace:
 [1] string_index_err(s::String, i::Int64)
   @ Base ./strings/string.jl:12
 [2] getindex
   @ ./strings/string.jl:263 [inlined]
 [3] lookup_doc(ex::Symbol)
   @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/docview.jl:224
 [4] docm(source::LineNumberNode, mod::Module, ex::Any)
   @ Base.Docs ./docs/Docs.jl:521
 [5] var"@doc"(__source__::LineNumberNode, __module__::Module, x::Vararg{Any, N} where N)
   @ Core ./boot.jl:508
in expression starting at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/docview.jl:466

The error is a little confusing, since it doesn't seem that it can't find the documentation, but rather, it fails to index into the string "÷=".

Version info:

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
@louie-github
Copy link
Author

I'm guessing this is related to how ÷= is a Unicode string, and indexing into UTF-8 encoded strings can pose problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant