openresty / openresty/lua-nginx-module

utf-8 support

Open
#1,495 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

Hello I use nginx 1.15.8 and lua-nginx-module 0.10.14
I try to show ngx.var.ssl_client_i_dn_legacy
the part of this value is
"\xD0\x9C\xD0\xBE\xD1\x81\xD0\xBA\xD0\xB2\xD0\xB0"
in lua 5.2 I can do

print(s)
Москва
but here in lua 5.1 it doesn't work
how to fix this?
I can use also ngx.var.ssl_client_i_dn
but it has value in utf-16 and I think it is more difficult to convert it to normal string
example \U041C\U043E\U0441\U043A\U0432\U0430
but if you know how to do this please answer

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported behavior with nginx 1.15.8, lua-nginx-module 0.10.14, and Lua 5.1 versus Lua 5.2, using ngx.var.ssl_client_i_dn_legacy and ngx.var.ssl_client_i_dn. A contribution would need a confirmed scope, such as a documented or tested fix for the UTF-8 handling, but the issue does not identify files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.