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

Chinese characters, a null pointer error will occur. #515

Closed
leptobo opened this issue Jun 13, 2024 · 7 comments
Closed

Chinese characters, a null pointer error will occur. #515

leptobo opened this issue Jun 13, 2024 · 7 comments

Comments

@leptobo
Copy link

leptobo commented Jun 13, 2024

Description

func Open (filename string )(*Document ,error ){_gegb ,_efgb :=_ed .Open (filename );if _efgb !=nil {return nil ,_be .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",filename ,_efgb );};defer _gegb .Close ();
_faec ,_efgb :=_ed .Stat (filename );if _efgb !=nil {return nil ,_be .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",filename ,efgb );}; =_faec ;return Read (_gegb ,_faec .Size ());};

When using this method, if the file path (filename) contains Chinese characters, a null pointer error will occur.

Expected Behavior

实际行为

func Open (filename string )(*Document ,error ){_gegb ,_efgb :=_ed .Open (filename );if _efgb !=nil {return nil ,_be .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",filename ,_efgb );};defer _gegb .Close ();
_faec ,_efgb :=_ed .Stat (filename );if _efgb !=nil {return nil ,_be .Errorf ("e\u0072r\u006f\u0072\u0020\u006f\u0070\u0065\u006e\u0069n\u0067\u0020\u0025\u0073: \u0025\u0073",filename ,efgb );}; =_faec ;return Read (_gegb ,_faec .Size ());};

Please include a reproducible code snippet or document attachment that
demonstrates the issue.

Copy link

Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized,
other issues go into our backlog where they are assessed and fitted into the roadmap when suitable.
If you need to get this done, consider buying a license which also enables you to use it in your commercial products.
More information can be found on https://unidoc.io/

@sampila
Copy link
Collaborator

sampila commented Jun 13, 2024

Hi @leptobo could you share the DOCX file?

@leptobo
Copy link
Author

leptobo commented Jun 13, 2024

Hi @leptobo could you share the DOCX file?
i need your email

@sampila
Copy link
Collaborator

sampila commented Jun 13, 2024

Hi @leptobo could you share the DOCX file?
i need your email

You can send the file to support@unidoc.io, with the information linked to this issue.

@leptobo
Copy link
Author

leptobo commented Jun 14, 2024

Hi @leptobo could you share the DOCX file?
i need your email

You can send the file to support@unidoc.io, with the information linked to this issue.

I have already sent the email. Later, I tried different Chinese files; smaller files could be opened correctly, but larger ones reported a null pointer error. Reading the file from the email resulted in an error.

@sampila
Copy link
Collaborator

sampila commented Jun 14, 2024

Hi @leptobo could you share the DOCX file?
i need your email

You can send the file to support@unidoc.io, with the information linked to this issue.

I have already sent the email. Later, I tried different Chinese files; smaller files could be opened correctly, but larger ones reported a null pointer error. Reading the file from the email resulted in an error.

Thanks, we will checks that and inform you the updates later.

@ipod4g
Copy link

ipod4g commented Jul 18, 2024

@leptobo We have not encountered any errors or problems while running it.
There may be specific conditions or settings affecting your experience.
I am closing this as 'not reproduced' for now. Please feel free to reopen it if you face any further issues.

@ipod4g ipod4g closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2024
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

No branches or pull requests

3 participants