I haven't tested it on Linux or Mac, but on Windows using an IME does not produce the desired text. This should be easily fixable with a newer version of SDL, as modern versions actually have proper IME support.
Reference: https://github.com/libsdl-org/SDL/blob/main/src/video/windows/SDL_windowskeyboard.c