8000 [DomCrawler] \Symfony\Component\DomCrawler\Crawler::addHtmlContent charset "gbk"? · Issue #9321 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DomCrawler] \Symfony\Component\DomCrawler\Crawler::addHtmlContent charset "gbk"? #9321

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

Closed
bronze1man opened this issue Oct 17, 2013 · 1 comment

Comments

@bronze1man
Copy link
Contributor

I come across this problem from
http://www.taobao.com/
It seems like "gbk" not in mb_list_encodings() ..
also see https://bugs.php.net/bug.php?id=45086
also see #9061

Currently I can only convert encoding myself or pass "gb18030" when handle with "gbk".

@bronze1man
Copy link
Contributor Author

I found some solution:

  • put @ before mb_convert_encoding
  • Provide a full list of support encoding to check.

I will try solution 1.

bronze1man added a commit to bronze1man/symfony that referenced this issue Oct 17, 2013
fabpot added a commit that referenced this issue Dec 29, 2013
…ing support (bronze1man)

This PR was submitted for the 2.2 branch but it was merged into the 2.3 branch instead (closes #9323).

Discussion
----------

[DomCrawler]fix #9321 Crawler::addHtmlContent add gbk encoding support

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |  #9321
| License       | MIT
| Doc PR        | n/a

This is solution 1 in #9321 (comment)

Commits
-------

30af288 fix some cs
9f20b24 use restore_error_handler instead of set_error_handler($previous)
53cb6ad [DomCrawler]fix #9321 Crawler::addHtmlContent add gbk encoding support
@fabpot fabpot closed this as completed Dec 29, 2013
fabpot added a commit that referenced this issue Dec 29, 2013
* 2.3:
  fix some cs
  use restore_error_handler instead of set_error_handler($previous)
  fix #9321 Crawler::addHtmlContent add gbk encoding support
  [Console] fixed column width when using the Table helper with some decoration in cells
  [Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
  Fix for cache-key conflict when having a \Traversable as choices
  [Security] removed obsolete comment

Conflicts:
	src/Symfony/Component/Console/Helper/TableHelper.php
	src/Symfony/Component/Security/Tests/Http/Firewall/ExceptionListenerTest.php
fabpot added a commit that referenced this issue Dec 29, 2013
* 2.4:
  fix some cs
  use restore_error_handler instead of set_error_handler($previous)
  fix #9321 Crawler::addHtmlContent add gbk encoding support
  [Console] fixed column width when using the Table helper with some decoration in cells
  [Security] Fixed problem with losing ROLE_PREVIOUS_ADMIN role.
  Fix for cache-key conflict when having a \Traversable as choices
  [Security] removed obsolete comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0