[Jprogramming] passing unicode argument to dll

Eric Iverson eiverson at sympatico.ca
Mon Sep 24 03:14:24 HKT 2007


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" <karambula at hot.ee>
To: "'Programming forum'" <programming at jsoftware.com>
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 



More information about the Programming mailing list