seanjensengrey / mosh-scheme

Automatically exported from code.google.com/p/mosh-scheme
Other
0 stars 0 forks source link

FFI calls with char* are not 8-bit clean #230

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

(import (rnrs)
        (mosh ffi))

(let ((lib (open-shared-library "libc.so.6")))
  (define puts (c-function lib int puts char*))

  (puts "Hello, world!")
  (puts "What\x02bc;s up?"))

What is the expected output? What do you see instead?
Expected:
  Hello, world!
  Whatʼs up? 
(Unicode apostrophe)

Saw:
  Hello, world!
  What¼s up?
(one-quarter sign)

What version of the product are you using? On what operating system?
Mosh from git, commit 018e5d2754cdc952adbf48425e2a791e9233109a
Linux vuurvlieg 3.2.0-2-amd64 #1 SMP Mon Apr 30 05:20:23 UTC 2012 x86_64 
GNU/Linux

Original issue reported on code.google.com by amoe...@gmail.com on 12 May 2012 at 10:35

GoogleCodeExporter commented 9 years ago

Original comment by hige...@gmail.com on 20 May 2012 at 8:29