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

Do tags in Excel support Chinese characters? If so, how should they be represented? #320

Open
hexin-666 opened this issue May 31, 2024 · 7 comments
Labels
question Further information is requested

Comments

@hexin-666
Copy link

I get an error when using ${中文}, and when using ${"中文"}, the data fills with the literal string "中文" instead of the actual data.

@hexin-666 hexin-666 added the bug Something isn't working label May 31, 2024
@hexin-666
Copy link
Author

i used jxls-2.14.0

@gastendonk
Copy link
Member

I use only Latin script. So I don't know!

Everything inside ${..} is a JEXL expression. So this question is Apache JEXL specific and you should ask the JEXL team. Maybe you can debug if the encoding from Java code to JEXL is correct.

@leonate Do you know if Russian characters are possible?

@gastendonk gastendonk added question Further information is requested and removed bug Something isn't working labels May 31, 2024
@hexin-666
Copy link
Author

image

The JEXL encoding is correct. Below is the result of setting the label to ${"部门"}.
The lastMatchEvalResult should be the actual filled value from the matching Map, but after the method in the red box, lastMatchEvalResult = "部门" instead of the actual value "总部门".

@gastendonk
Copy link
Member

gastendonk commented May 31, 2024

I suggest that you debug it with the master version of Jxls and debug deeper. Starting with Jxls version 3.0 you have a better chance to modify the Jxls code if necessary (ExpressionEvaluatorContext.evaluateRawExpression()).

@hexin-666
Copy link
Author

image
First of all, thank you for your response and assistance.

I modified line 297 of CellData as shown in the image to support Chinese. The format for Chinese labels is: ${部门}. However, the dynamic table must be in the format ${xx.xx}. Additionally, version 2.14.0 supports labels in the format ${xx."部门"}.

Finally, I would like to express my sincere gratitude once again for your response and help.

@SoltauFintel
Copy link
Member

I this a question or can this issue be closed? I would not change it that way.

@leonate
Copy link
Member

leonate commented Jun 5, 2024

@leonate Do you know if Russian characters are possible?
Don't know, would need to try.

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

No branches or pull requests

4 participants