I have a Japanese string in my (UTF-8 encoded) database '利用規約' which is passed to php's json_encode function and receive this warning:
PHP Warning: json_encode(): Invalid UTF-8 sequence in argument
Is there a way to convert this to valid UTF-8 in order to avoid this? If the db is utf-8 why would php have a problem with the string?
Update:
Turns out the error was in fact due to a problem with sprintf and multibyte characters a couple lines earlier.