If the data is utf8 then you want *c declarations. If the data is utf16 then you want *w declarations.

----- Original Message ----- From: "Kairit Sirts" <[EMAIL PROTECTED]>
To: "'Programming forum'" <[email protected]>
Sent: Sunday, September 23, 2007 6:34 AM
Subject: [Jprogramming] passing unicode argument to dll


Hi!

I pass an unicode argument to dll and I expect to get back also unicode argument, but the result is type of literal.

word
┌──────┐
│nägin│
└──────┘
  datatype >word
unicode


script_z_ '~system\main\dll.ijs'
syllabify=: >@{.@('C:\j601\addons\syllabif\syllabif.dll syllabify *c *c'&cd)

NUL =. 0 { a.
zerocut =: {.~i.&NUL

syllabification =: 3 : 0
1!:44 'C:\j601\addons\syllabif'
r =. syllabify < y
aadress =. (;(0{r))
syllables =. zerocut > memr aadress, 0, 128
jaga syllables
)


The fragment " memr aadress, 0, 128" will give the result:

memr aadress, 0, 128
n-gin

datatype memr aadress, 0, 128
literal

How to save the umlaut charaters while processing? It is not restricted to use umlaut characters in this dll. Strange thing is, that I have used this dll for this task already earlier and I can't recall there was such problem then

Kairit Sirts



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to