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

Fixes #341 #342

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fixes #341 #342

wants to merge 4 commits into from

Conversation

Schrank
Copy link

@Schrank Schrank commented Sep 22, 2021

Fixes #341

@Schrank Schrank changed the title Fixes #431 Fixes #341 Sep 22, 2021
@oliverklee oliverklee deleted the branch MyIntervals:main February 7, 2024 11:36
@oliverklee oliverklee closed this Feb 7, 2024
@oliverklee oliverklee reopened this Feb 7, 2024
@oliverklee oliverklee changed the base branch from master to main February 7, 2024 22:35
@oliverklee
Copy link
Contributor

This PR now has merge conflicts. Could you please resolve them and repush, @Schrank? Thanks!

Also, we should have a regression test (that passes with the fix and fails without it.)

@Schrank
Copy link
Author

Schrank commented Feb 3, 2025

@oliverklee Happy to fix the merge conflict, but as I read the bug description it sounds like something broken with the libraries below PHP. I haven't tried but don't think writing a test is easy to achieve :-/ Therefore: Sorry, but I don't try it.

@dinamic
Copy link

dinamic commented Feb 3, 2025

@Schrank won't rebasing the PR towards the current master solve things?

The only adjustment needed is probably to add dependency on ext-mbstring in composer.json.

@Schrank
Copy link
Author

Schrank commented Feb 3, 2025

@dinamic To avoid misunderstanging: I'm not blocking to help, conflict is resolved and mbstring is added!

I'm just denying to implement a test, because that feelss very heisen-buggy :-(

@dinamic
Copy link

dinamic commented Feb 3, 2025

@Schrank I maybe able to help with the unit test, if you like.

I'd need to reproduce the problem tho. Could you give me the steps needed with a docker setup, for example?

@coveralls
Copy link

Coverage Status

coverage: 45.68%. remained the same
when pulling 49ee98d on Schrank:patch-1
into 1fad44a on MyIntervals:main.

Copy link
Contributor

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinamic, thanks for offering to help out. Have you found a similar problem?

I'd need to reproduce the problem tho.

That may be tricky, since some forensic evidence may have been lost in the midsts of time.

The report cites an E_NOTICE from iconv() which is not an exception. Perhaps mb_convert_encoding() does not give such a notice upon error, and it is thus irrelevant which is used, since both will fail (one more silentlty that the other).

The likely CSS (untested) would be something like

.smiley::after {
  content: "\1F642"
}

I did some digging and found this comment on Stack Overflow:

iconv shows this error message if either encoding specified does not exist... On Linux, iconv -l in a shell shows what character sets are supported

My thinking is that this is a server-specific issue, and there is no (current) justification for switching from iconv to mb_string.

Though if iconv is tied to an unreliable OS function, whilst mb_convert_encoding comes reliably packaged with PHP, the latter would be preferable - if that's the case.

@dinamic, if you'd like to create some tests, they would be very welcome. The CSSString class needs a corresponding TestCase... :))

With a decent set of tests, we would have a better idea of whether switching from iconv to mb_string would be viable and positive.

Also, we should have a regression test (that passes with the fix and fails without it.)

I don't think that's possible, since the issue is confuguration-dependent.

@Schrank
Copy link
Author

Schrank commented Feb 6, 2025

@JakeQZ thanks for chiming in!

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

Successfully merging this pull request may close these issues.

iconv(): Wrong charset, conversion from utf-32le to utf-8 is not allowed
5 participants