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

Can i ignore the check on "zxx" locale code ? #1298

Closed
1 of 3 tasks
mdeprezzo opened this issue Feb 27, 2018 · 9 comments
Closed
1 of 3 tasks

Can i ignore the check on "zxx" locale code ? #1298

mdeprezzo opened this issue Feb 27, 2018 · 9 comments

Comments

@mdeprezzo
Copy link

mdeprezzo commented Feb 27, 2018

This is:

Expected Behavior

Can i ignore the locale code check ? If don't in the default locale ?

Current Behavior

For some file i got this error: zxx is not a valid language code

Failure Information

zxx is not a valid language code

How to Reproduce

I don't know, i'm converting a rtf file with libreoffice and then i try to read with phpword reader.

Context

  • PHP version: 7.1.13
  • PHPWord version: 0.14
@troosan
Copy link
Contributor

troosan commented Feb 28, 2018

@mdeprezzo can you provide a dummy file that produces this error?

@mdeprezzo
Copy link
Author

@troosan Sure i attach that file here
romanzo.rtf.zip

@troosan
Copy link
Contributor

troosan commented Mar 2, 2018

@mdeprezzo I don't see where this zxx is coming from (I cannot find this string anywhere in the rtf document). You are reading the rtf file directly or transforming the rtf -> docx and then reading the docx? In which case, can you send me the docx file.

@mdeprezzo
Copy link
Author

@troosan oh yep, i convert the rtf file to docx with libreoffice

@troosan
Copy link
Contributor

troosan commented Mar 4, 2018

@mdeprezzo I did the exact same thing, but nowhere in the docx I get zxx locale. Can you provide me with a docx document?

@mdeprezzo
Copy link
Author

mdeprezzo commented Mar 4, 2018

@troosan Before, i'll try again to upload the rtf file, and after convert by libreoffice i check again the error.

@moromete
Copy link

I can confirm also that when you set on LibreOffice default language for documents as "[None]"
The docx files are generated with the following in word\styles.xml
<w:lang w:val="zxx" w:eastAsia="zh-CN" w:bidi="hi-IN"/>
screenshot_20180726_155011
zxx_locale.docx

@troosan
Copy link
Contributor

troosan commented Jul 27, 2018

very nice :-)
I'll remove the check then

@fhferreira
Copy link

fhferreira commented Feb 18, 2020

+1 "pt_BR is not a valid language code"

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

No branches or pull requests

4 participants