@@ -310,6 +310,11 @@ foreign import ccall unsafe "get_buffer_used"
310foreign import ccall unsafe "my_emitter_set_output"
310foreign import ccall unsafe "my_emitter_set_output"
311 c_my_emitter_set_output :: Emitter -> Buffer -> IO ()
311 c_my_emitter_set_output :: Emitter -> Buffer -> IO ()
313+#ifndef __NO_UNICODE__
314+foreign import ccall unsafe "yaml_emitter_set_unicode"
315+ c_yaml_emitter_set_unicode :: Emitter -> CInt -> IO ()
313foreign import ccall unsafe "yaml_emitter_set_output_file"
318foreign import ccall unsafe "yaml_emitter_set_output_file"
314 c_yaml_emitter_set_output_file :: Emitter -> File -> IO ()
319 c_yaml_emitter_set_output_file :: Emitter -> File -> IO ()
@@ -618,6 +623,9 @@ runEmitter allocI closeI =
618 emitter <- mallocBytes emitterSize
623 emitter <- mallocBytes emitterSize
619 res <- c_yaml_emitter_initialize emitter
624 res <- c_yaml_emitter_initialize emitter
620 when (res == 0) $ throwIO $ YamlException "c_yaml_emitter_initialize failed"
625 when (res == 0) $ throwIO $ YamlException "c_yaml_emitter_initialize failed"
626+#ifndef __NO_UNICODE__
627+ c_yaml_emitter_set_unicode emitter 1
621 a <- allocI emitter
629 a <- allocI emitter
622 return (emitter, a)
630 return (emitter, a)
623 cleanup (emitter, _) = do
631 cleanup (emitter, _) = do