-
Notifications
You must be signed in to change notification settings - Fork 473
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
Comments
Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized, |
Hi @leptobo could you share the DOCX file? |
|
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. |
@leptobo We have not encountered any errors or problems while running it. |
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.
The text was updated successfully, but these errors were encountered: