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

Special characters problem #110

Open
sgasser opened this issue Oct 1, 2015 · 4 comments
Open

Special characters problem #110

sgasser opened this issue Oct 1, 2015 · 4 comments

Comments

@sgasser
Copy link

sgasser commented Oct 1, 2015

I save a new Job with special characters:

$subject = 'Passwort für Ihr Konto ändern';
$job = new Job('mailer:send', array($subject));
$em->persist($job);
$em->flush($job);

In the args column of jms_jobs table I have "unicode escape sequences":

["Passwort f\u00fcr Ihr Konto \u00e4ndern"]

In the command file I read the subject argument

$subject = $input->getArgument('subject');
echo $subject;

The special characters are missing

Passwort fr Ihr Konto ndern

Do you have any suggestions?

Thanks

@Disparity
Copy link

Encountered with such a problem when the console has an 8-bit encoding, but not utf-8.
When setting UTF-8 encoding - began to come to the correct parameters.

@schmittjoh
Copy link
Owner

I'd suggest to create an OutgoingEmail entity and just pass the ID of the entity to the console command instead of the entire payload.

@sgasser
Copy link
Author

sgasser commented Oct 1, 2015

@Disparity
Calling the command directly works:

php app/console mailer:send 'Passwort für Ihr Konto ändern'

@schmittjoh
If there won't be a patch to fix, I will try. Thanks

@sgasser
Copy link
Author

sgasser commented Oct 1, 2015

Fast workaround

Encode subject on Job create: $subject = json_encode($subject);
and decode in command file.

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