1. A little help with phix - please

hi, i try to get some code with phix running. if i have (with pdfium):

  function GetTextOfPage(atom pageHandle) 
    sequence result = {} 
    integer totalChars = GetTextCountChars(pageHandle) 
    if totalChars > 0 then 
      integer bufferlength = (totalChars * 2) -- * 2 since it is wchar 
      atom pageresultbuffer = allocate(bufferlength) 
      integer resi = c_func(FPDFText_GetText, {pageHandle, 0, totalChars, pageresultbuffer}) 
      result = peek_wstring(pageresultbuffer) 
--      result = peek_string(pageresultbuffer) 
      delete(pageresultbuffer) 
      return result 
    end if 
    return {} 
  end function 

then result returns a wstring. how do i display that with phix? oeu it seem to work transparent

  sequence text = GetDocumentText(docHandle) 
puts(1, text) 

for some reason i can't figure out how you 'EASY' work with phix on wstring (win 2 byte chars).

any help and/or demos pointers would be very welcome.

new topic     » topic index » view message » categorize

2. Re: A little help with phix - please

try using utf16_to_utf8().

I cannot offhand say why it works transparently on OE but not on phix. It may be an OS-specific console setup thing (are you on windows or linux?). Perhaps if you show me the output of say:

sequence text = GetDocumentText(docHandle)  
--/**/ ? text&-1 
--/**/ text = utf16_to_utf8(text) -- (not needed on OE) 
--/**/ ? text&-1 
puts(1, text) 

I may be able to shed some more light. (The above is written so that OE ignores the middle three lines but phix does not, and the &-1 forces output as integers rather than chars.)
If text is rather big, perhaps you could do something like text = text[240..260] to trim it down to the first place it goes wrong.
I should also say that utf16_to_utf8() may terminate in error if passed an 8-bit string.

Incidentally, you may fare slightly better by hiding the OE includes from phix as follows:

--/* 
include std/dll.e  
include std/machine.e  
include std/math.e  
--*/ 

In the particular case of peek_wstring() from std/machine.e you are probably fine, but several std/ routines (ie OE standard includes) may not work on phix.
You can always ask me to add an equivalent to builtins of any routine in std that you regularly use, though since last time I checked there were about 500 of them, I reserve the right to say no smile

Regards, Pete

new topic     » goto parent     » topic index » view message » categorize

3. Re: A little help with phix - please

hi, thanks for your answer and insights. i am on a: windows 10/x64 i7700HQ - 32 GB 1.5 TB ssd

it would be very nice, if wstrings would work transparently. thanks for your work and time.

the program

  public procedure InitializePdfium() 
      c_proc(FPDF_InitLibrary) 
  end procedure 
 
  public procedure DeInitializePdfium() 
      c_proc(FPDF_DestroyLibrary) 
  end procedure 
 
  public function LoadDocument(sequence filename) 
    atom book = allocate_string(filename) 
    atom dochandle = c_func(FPDF_LoadDocument, {book, 0}) 
    delete(book) 
    return dochandle 
  end function 
   
  public procedure CloseDocument(atom docHandle) 
    c_proc(FPDF_CloseDocument,{docHandle}) 
  end procedure 
 
  public function GetPageCount(atom docHandle) 
    return c_func(FPDF_GetPageCount, {docHandle}) 
  end function 
 
  public function LoadPage(atom docHandle, integer pagenumber) 
    return c_func(FPDF_LoadPage, {docHandle, pagenumber}) 
  end function 
 
  public function LoadTextPage(integer pagenumber) 
    return c_func(FPDFText_LoadPage, {pagenumber}) 
  end function 
   
  public function GetTextCountChars(atom pageHandle) 
    return c_func(FPDFText_CountChars, {pageHandle}) 
  end function 
   
  function GetTextOfPage(atom pageHandle) 
    sequence result = {} 
    integer totalChars = GetTextCountChars(pageHandle) 
    if totalChars > 0 then 
      integer bufferlength = (totalChars * 2) -- * 2 since it is wchar 
      atom pageresultbuffer = allocate(bufferlength) 
      integer resi = c_func(FPDFText_GetText, {pageHandle, 0, totalChars, pageresultbuffer}) 
      result = peek_wstring(pageresultbuffer) 
--      result = peek_string(pageresultbuffer) 
      delete(pageresultbuffer) 
      return result 
    end if 
    return {} 
  end function 
   
  public procedure CloseTextPage(atom pageHandle) 
    c_proc(FPDFText_ClosePage, {pageHandle}) 
  end procedure 
   
  public procedure ClosePage(atom page) 
    c_proc(FPDF_ClosePage, {page}) 
  end procedure 
   
  public function LoadMemDocument(atom docHandle, integer filesize) 
    atom PdfBuffer = allocate(filesize) 
    atom ptr = c_func(FPDF_LoadMemDocument, {PdfBuffer, filesize, 0x0}) 
    return ptr 
  end function 
   
  public function GetDocumentText(atom docHandle, integer pagenumber) 
    atom page = LoadPage(docHandle, pagenumber) 
    atom pageHandle = LoadTextPage(page) 
    sequence result = GetTextOfPage(pageHandle) 
    CloseTextPage(pageHandle) 
    ClosePage(page) 
    return result 
  end function 
 
  public function GetPageSizeByIndex(atom docHandle, integer pagenumber) 
    atom pwidth = allocate(8) 
    atom pheight = allocate(8) 
    integer i = c_func(_FPDF_GetPageSizeByIndex, {docHandle, 100, pwidth, pheight}) 
    if not i then 
      delete(pwidth) 
      delete(pheight) 
      return {} 
    end if 
    object w = float64_to_atom(peek({pwidth, 8})) 
    object h = float64_to_atom(peek({pheight, 8})) 
    delete(pwidth) 
    delete(pheight) 
    return {w,h} 
  end function 
   
  public function RenderPageToImage(atom docHandle, integer page) 
    atom bitmap_ptr = 0 
    atom pagehandle = LoadPage(docHandle, page) 
    sequence wh = GetPageSizeByIndex(docHandle, page) 
    c_proc(FPDF_RenderPageBitmap, {bitmap_ptr,page,0,0,wh[1],wh[1],0,0x100}) 
    return bitmap_ptr 
  end function 
 
  public function GetDocumentMetaText(atom docHandle, sequence metafield) 
    sequence result = {} 
    atom meta = allocate_string(metafield) 
    integer bufsize = c_func(FPDF_GetMetaText, {docHandle, meta, 0, 0}) 
    if bufsize > 0 then 
      atom metaresultbuffer = allocate(500) 
      integer resi = c_func(FPDF_GetMetaText, {docHandle, meta, metaresultbuffer, 500}) 
--      result = peek_wstring(metaresultbuffer) 
      result = peek_string(metaresultbuffer) 
      delete(metaresultbuffer) 
    end if 
    delete(meta) 
    return result 
  end function 
 
 
 
 
InitializePdfium() 
atom docHandle = LoadDocument("3658071664.pdf") 
integer pg = GetPageCount(docHandle) 
sequence x = GetPageSizeByIndex(docHandle, 100) 
 
sequence text = GetDocumentText(docHandle, 9) 
--/**/ ? text&-1  
--/**/ text = utf16_to_utf8(text) -- (not needed on OE)  
--/**/ ? text&-1  
puts(1, text)  
 
CloseDocument(docHandle) 
DeInitializePdfium() 
atom xx = wait_key() 

the output is:

"std/types0" 
"std/types" 
"std/types2" 
{88,32,73,110,104,97,108,116,115,118,101,114,122,101,105,99,104,110,105,115,13,10,49,48,46,52,46,50,32,75,111,110,122,101,112,116,105,111,110,101,108,108,101,32,68,97,114,115,116,101,108,108,117,110,103,32,115,116,114,97,116,101,103,105,115,99,104,101,114,32,67,111,110,116,114,111,108,108,105,110,103,105,110,115,116,114,117,109,101,110,116,101,32,49,53,52,13,10,49,48,46,53,32,73,110,110,111,118,97,116,105,111,110,115,98,101,119,101,114,116,117,110,103,32,105,109,32,82,97,104,109,101,110,32,100,101,114,32,66,105,108,97,110,122,105,101,114,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,53,53,13,10,49,48,46,54,32,65,107,116,117,101,108,108,101,32,69,110,116,119,105,99,107,108,117,110,103,101,110,32,117,110,100,32,70,111,114,115,99,104,117,110,103,115,98,101,100,97,114,102,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,53,56,13,10,76,105,116,101,114,97,116,117,114,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,48,13,10,49,49,32,75,111,110,116,105,110,117,105,101,114,108,105,99,104,101,32,66,117,115,105,110,101,115,115,32,73,110,110,111,118,97,116,105,111,110,58,13,10,83,121,115,116,101,109,97,116,105,115,99,104,101,32,87,101,105,116,101,114,101,110,116,119,105,99,107,108,117,110,103,32,107,111,109,112,108,101,120,101,114,32,71,101,115,99,104,228,102,116,115,108,246,115,117,110,103,101,110,13,10,100,117,114,99,104,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,45,98,97,115,105,101,114,116,101,115,32,77,97,110,97,103,101,109,101,110,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,51,13,10,82,111,98,101,114,116,32,87,105,110,116,101,114,32,117,110,100,32,84,111,98,105,97,115,32,77,101,116,116,108,101,114,13,10,49,49,46,49,32,69,105,110,108,101,105,116,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,51,13,10,49,49,46,50,32,83,105,110,110,44,32,90,119,101,99,107,32,117,110,100,32,84,121,112,101,110,32,118,111,110,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,52,13,10,49,49,46,51,32,65,110,119,101,110,100,117,110,103,32,105,110,32,100,101,114,32,80,114,97,120,105,115,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,55,13,10,49,49,46,52,32,83,121,115,116,101,109,97,116,105,115,99,104,101,32,69,110,116,119,105,99,107,108,117,110,103,32,118,111,110,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,55,48,13,10,49,49,46,53,32,83,121,115,116,101,109,97,116,105,115,99,104,101,32,78,117,116,122,117,110,103,32,118,111,110,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,55,55,13,10,49,49,46,54,32,75,111,110,107,108,117,115,105,111,110,32,117,110,100,32,65,117,115,98,108,105,99,107,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,48,13,10,76,105,116,101,114,97,116,117,114,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,49,13,10,84,101,105,108,32,86,32,71,101,110,101,114,97,116,105,111,110,32,8211,32,68,101,115,105,103,110,32,8211,32,84,101,115,116,32,8211,32,76,97,117,110,99,104,13,10,49,50,32,87,105,101,32,75,111,110,115,117,109,101,110,116,101,110,32,73,110,110,111,118,97,116,105,111,110,101,110,32,119,97,104,114,110,101,104,109,101,110,13,10,78,101,117,97,114,116,105,103,107,101,105,116,32,117,110,100,32,83,105,110,110,104,97,102,116,105,103,107,101,105,116,32,97,108,115,32,122,101,110,116,114,97,108,101,32,68,101,116,101,114,109,105,110,97,110,116,101,110,32,46,46,46,46,46,46,46,46,46,32,49,56,55,13,10,84,111,114,115,116,101,110,32,84,111,109,99,122,97,107,44,32,68,101,110,110,105,115,32,86,111,103,116,32,117,110,100,32,74,111,115,101,102,32,70,114,105,115,99,104,101,105,115,101,110,13,10,49,50,46,49,32,69,105,110,108,101,105,116,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,55,13,10,49,50,46,50,32,73,110,110,111,118,97,116,105,111,110,115,119,97,104,114,110,101,104,109,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,56,13,10,49,50,46,50,46,49,32,78,101,117,97,114,116,105,103,107,101,105,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,57,13,10,49,50,46,50,46,50,32,83,105,110,110,104,97,102,116,105,103,107,101,105,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,57,50,13,10,49,50,46,50,46,51,32,90,117,115,97,109,109,101,110,102,97,115,115,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,50,13,10,49,50,46,51,32,73,110,110,111,118,97,116,105,111,110,115,109,97,110,97,103,101,109,101,110,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,50,13,10,49,50,46,51,46,49,32,83,116,114,97,116,101,103,105,115,99,104,101,32,79,114,105,101,110,116,105,101,114,117,110,103,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,50,13,10,49,50,46,51,46,50,32,67,114,111,115,115,45,102,117,110,107,116,105,111,110,97,108,101,32,73,110,116,101,103,114,97,116,105,111,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,52,13,10,49,50,46,51,46,51,32,90,117,115,97,109,109,101,110,102,97,115,115,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,53,13,10,49,50,46,52,32,83,99,104,108,117,115,115,98,101,116,114,97,99,104,116,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,54,13,10,76,105,116,101,114,97,116,117,114,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,55,13,10,49,51,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,77,97,114,107,101,116,105,110,103,58,32,78,101,117,101,32,75,117,110,100,101,110,98,101,100,252,114,102,110,105,115,115,101,32,119,101,99,107,101,110,32,46,46,46,46,46,46,32,50,49,49,13,10,68,101,110,110,105,115,32,72,101,114,104,97,117,115,101,110,32,117,110,100,32,77,97,114,99,117,115,32,83,99,104,246,103,101,108,13,10,49,51,46,49,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,105,109,32,77,97,114,107,101,116,105,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,49,13,10,49,51,46,49,46,49,32,67,117,115,116,111,109,101,114,45,68,114,105,118,101,110,32,117,110,100,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,50,13,10,49,51,46,49,46,50,32,72,101,114,97,117,115,102,111,114,100,101,114,117,110,103,101,110,32,107,117,110,100,101,110,111,114,105,101,110,116,105,101,114,116,101,114,32,73,110,110,111,118,97,116,105,111,110,115,115,116,114,97,116,101,103,105,101,110,32,46,46,46,32,50,49,51,13,10,49,51,46,50,32,80,114,111,122,101,115,115,32,100,101,115,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,52,13,10,49,51,46,50,46,49,32,85,110,116,101,114,110,101,104,109,101,110,32,97,117,102,32,110,101,117,101,32,66,101,100,252,114,102,110,105,115,115,101,32,101,105,110,115,116,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,52,13,10,49,51,46,50,46,50,32,77,105,116,97,114,98,101,105,116,101,114,32,118,111,110,32,104,101,117,116,105,103,101,110,32,66,101,100,252,114,102,110,105,115,115,101,110,32,108,246,115,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,54,-1} 
{88,32,73,110,104,97,108,116,115,118,101,114,122,101,105,99,104,110,105,115,13,10,49,48,46,52,46,50,32,75,111,110,122,101,112,116,105,111,110,101,108,108,101,32,68,97,114,115,116,101,108,108,117,110,103,32,115,116,114,97,116,101,103,105,115,99,104,101,114,32,67,111,110,116,114,111,108,108,105,110,103,105,110,115,116,114,117,109,101,110,116,101,32,49,53,52,13,10,49,48,46,53,32,73,110,110,111,118,97,116,105,111,110,115,98,101,119,101,114,116,117,110,103,32,105,109,32,82,97,104,109,101,110,32,100,101,114,32,66,105,108,97,110,122,105,101,114,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,53,53,13,10,49,48,46,54,32,65,107,116,117,101,108,108,101,32,69,110,116,119,105,99,107,108,117,110,103,101,110,32,117,110,100,32,70,111,114,115,99,104,117,110,103,115,98,101,100,97,114,102,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,53,56,13,10,76,105,116,101,114,97,116,117,114,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,48,13,10,49,49,32,75,111,110,116,105,110,117,105,101,114,108,105,99,104,101,32,66,117,115,105,110,101,115,115,32,73,110,110,111,118,97,116,105,111,110,58,13,10,83,121,115,116,101,109,97,116,105,115,99,104,101,32,87,101,105,116,101,114,101,110,116,119,105,99,107,108,117,110,103,32,107,111,109,112,108,101,120,101,114,32,71,101,115,99,104,195,164,102,116,115,108,195,182,115,117,110,103,101,110,13,10,100,117,114,99,104,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,45,98,97,115,105,101,114,116,101,115,32,77,97,110,97,103,101,109,101,110,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,51,13,10,82,111,98,101,114,116,32,87,105,110,116,101,114,32,117,110,100,32,84,111,98,105,97,115,32,77,101,116,116,108,101,114,13,10,49,49,46,49,32,69,105,110,108,101,105,116,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,51,13,10,49,49,46,50,32,83,105,110,110,44,32,90,119,101,99,107,32,117,110,100,32,84,121,112,101,110,32,118,111,110,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,52,13,10,49,49,46,51,32,65,110,119,101,110,100,117,110,103,32,105,110,32,100,101,114,32,80,114,97,120,105,115,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,54,55,13,10,49,49,46,52,32,83,121,115,116,101,109,97,116,105,115,99,104,101,32,69,110,116,119,105,99,107,108,117,110,103,32,118,111,110,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,55,48,13,10,49,49,46,53,32,83,121,115,116,101,109,97,116,105,115,99,104,101,32,78,117,116,122,117,110,103,32,118,111,110,32,82,101,105,102,101,103,114,97,100,109,111,100,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,55,55,13,10,49,49,46,54,32,75,111,110,107,108,117,115,105,111,110,32,117,110,100,32,65,117,115,98,108,105,99,107,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,48,13,10,76,105,116,101,114,97,116,117,114,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,49,13,10,84,101,105,108,32,86,32,71,101,110,101,114,97,116,105,111,110,32,226,128,147,32,68,101,115,105,103,110,32,226,128,147,32,84,101,115,116,32,226,128,147,32,76,97,117,110,99,104,13,10,49,50,32,87,105,101,32,75,111,110,115,117,109,101,110,116,101,110,32,73,110,110,111,118,97,116,105,111,110,101,110,32,119,97,104,114,110,101,104,109,101,110,13,10,78,101,117,97,114,116,105,103,107,101,105,116,32,117,110,100,32,83,105,110,110,104,97,102,116,105,103,107,101,105,116,32,97,108,115,32,122,101,110,116,114,97,108,101,32,68,101,116,101,114,109,105,110,97,110,116,101,110,32,46,46,46,46,46,46,46,46,46,32,49,56,55,13,10,84,111,114,115,116,101,110,32,84,111,109,99,122,97,107,44,32,68,101,110,110,105,115,32,86,111,103,116,32,117,110,100,32,74,111,115,101,102,32,70,114,105,115,99,104,101,105,115,101,110,13,10,49,50,46,49,32,69,105,110,108,101,105,116,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,55,13,10,49,50,46,50,32,73,110,110,111,118,97,116,105,111,110,115,119,97,104,114,110,101,104,109,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,56,13,10,49,50,46,50,46,49,32,78,101,117,97,114,116,105,103,107,101,105,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,56,57,13,10,49,50,46,50,46,50,32,83,105,110,110,104,97,102,116,105,103,107,101,105,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,49,57,50,13,10,49,50,46,50,46,51,32,90,117,115,97,109,109,101,110,102,97,115,115,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,50,13,10,49,50,46,51,32,73,110,110,111,118,97,116,105,111,110,115,109,97,110,97,103,101,109,101,110,116,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,50,13,10,49,50,46,51,46,49,32,83,116,114,97,116,101,103,105,115,99,104,101,32,79,114,105,101,110,116,105,101,114,117,110,103,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,50,13,10,49,50,46,51,46,50,32,67,114,111,115,115,45,102,117,110,107,116,105,111,110,97,108,101,32,73,110,116,101,103,114,97,116,105,111,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,52,13,10,49,50,46,51,46,51,32,90,117,115,97,109,109,101,110,102,97,115,115,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,53,13,10,49,50,46,52,32,83,99,104,108,117,115,115,98,101,116,114,97,99,104,116,117,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,54,13,10,76,105,116,101,114,97,116,117,114,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,48,55,13,10,49,51,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,77,97,114,107,101,116,105,110,103,58,32,78,101,117,101,32,75,117,110,100,101,110,98,101,100,195,188,114,102,110,105,115,115,101,32,119,101,99,107,101,110,32,46,46,46,46,46,46,32,50,49,49,13,10,68,101,110,110,105,115,32,72,101,114,104,97,117,115,101,110,32,117,110,100,32,77,97,114,99,117,115,32,83,99,104,195,182,103,101,108,13,10,49,51,46,49,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,105,109,32,77,97,114,107,101,116,105,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,49,13,10,49,51,46,49,46,49,32,67,117,115,116,111,109,101,114,45,68,114,105,118,101,110,32,117,110,100,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,50,13,10,49,51,46,49,46,50,32,72,101,114,97,117,115,102,111,114,100,101,114,117,110,103,101,110,32,107,117,110,100,101,110,111,114,105,101,110,116,105,101,114,116,101,114,32,73,110,110,111,118,97,116,105,111,110,115,115,116,114,97,116,101,103,105,101,110,32,46,46,46,32,50,49,51,13,10,49,51,46,50,32,80,114,111,122,101,115,115,32,100,101,115,32,67,117,115,116,111,109,101,114,45,68,114,105,118,105,110,103,32,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,52,13,10,49,51,46,50,46,49,32,85,110,116,101,114,110,101,104,109,101,110,32,97,117,102,32,110,101,117,101,32,66,101,100,195,188,114,102,110,105,115,115,101,32,101,105,110,115,116,101,108,108,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,52,13,10,49,51,46,50,46,50,32,77,105,116,97,114,98,101,105,116,101,114,32,118,111,110,32,104,101,117,116,105,103,101,110,32,66,101,100,195,188,114,102,110,105,115,115,101,110,32,108,195,182,115,101,110,32,46,46,46,46,46,46,46,46,46,46,46,46,46,32,50,49,54,-1} 
X Inhaltsverzeichnis 
10.4.2 Konzeptionelle Darstellung strategischer Controllinginstrumente 154 
10.5 Innovationsbewertung im Rahmen der Bilanzierung ............. 155 
10.6 Aktuelle Entwicklungen und Forschungsbedarf ................ 158 
Literatur ........................................... 160 
11 Kontinuierliche Business Innovation: 
Systematische Weiterentwicklung komplexer Gesch├ñftsl├Âsungen 
durch Reifegradmodell-basiertes Management .................. 163 
Robert Winter und Tobias Mettler 
11.1 Einleitung ....................................... 163 
11.2 Sinn, Zweck und Typen von Reifegradmodellen ............... 164 
11.3 Anwendung in der Praxis ............................. 167 
11.4 Systematische Entwicklung von Reifegradmodellen ............. 170 
11.5 Systematische Nutzung von Reifegradmodellen ................ 177 
11.6 Konklusion und Ausblick ............................. 180 
Literatur ........................................... 181 
Teil V Generation ÔÇô Design ÔÇô Test ÔÇô Launch 
12 Wie Konsumenten Innovationen wahrnehmen 
Neuartigkeit und Sinnhaftigkeit als zentrale Determinanten ......... 187 
Torsten Tomczak, Dennis Vogt und Josef Frischeisen 
12.1 Einleitung ....................................... 187 
12.2 Innovationswahrnehmung ............................. 188 
12.2.1 Neuartigkeit ................................. 189 
12.2.2 Sinnhaftigkeit ................................ 192 
12.2.3 Zusammenfassung ............................. 202 
12.3 Innovationsmanagement .............................. 202 
12.3.1 Strategische Orientierungen ....................... 202 
12.3.2 Cross-funktionale Integration ....................... 204 
12.3.3 Zusammenfassung ............................. 205 
12.4 Schlussbetrachtung ................................. 206 
Literatur ........................................... 207 
13 Customer-Driving Marketing: Neue Kundenbed├╝rfnisse wecken ...... 211 
Dennis Herhausen und Marcus Sch├Âgel 
13.1 Customer-Driving im Marketing ......................... 211 
13.1.1 Customer-Driven und Customer-Driving ................ 212 
13.1.2 Herausforderungen kundenorientierter Innovationsstrategien ... 213 
13.2 Prozess des Customer-Driving .......................... 214 
13.2.1 Unternehmen auf neue Bed├╝rfnisse einstellen ............ 214 
13.2.2 Mitarbeiter von heutigen Bed├╝rfnissen l├Âsen ............. 216 
Warning: H:\Euphoriaprog\dax\pdfium.ew:4705 parameter pagenumber is not used. 
Warning: H:\Euphoriaprog\dax\pdfium.ew:4690 parameter docHandle is not used. 
Warning: pdfium.ew:1779 constant FWL_EVENTKEYCMD_Char is not used. 
Warning: pdfium.ew:1778 constant FWL_EVENTKEYCMD_KeyUp is not used. 
Warning: pdfium.ew:1777 constant FWL_EVENTKEYCMD_KeyDown is not used. 
Warning: pdfium.ew:1574 constant FWL_EVENTMOUSECMD_MouseLeave is not used. 
Warning: pdfium.ew:1573 constant FWL_EVENTMOUSECMD_MouseHover is not used. 
Warning: pdfium.ew:1572 constant FWL_EVENTMOUSECMD_MouseEnter is not used. 
Warning: pdfium.ew:1571 constant FWL_EVENTMOUSECMD_MouseMove is not used. 
Warning: pdfium.ew:1570 constant FWL_EVENTMOUSECMD_MButtonDblClk is not used. 
Warning: pdfium.ew:1569 constant FWL_EVENTMOUSECMD_MButtonUp is not used. 
Warning: pdfium.ew:1568 constant FWL_EVENTMOUSECMD_MButtonDown is not used. 
Warning: pdfium.ew:1567 constant FWL_EVENTMOUSECMD_RButtonDblClk is not used. 
Warning: pdfium.ew:1566 constant FWL_EVENTMOUSECMD_RButtonUp is not used. 
Warning: pdfium.ew:1565 constant FWL_EVENTMOUSECMD_RButtonDown is not used. 
Warning: pdfium.ew:1564 constant FWL_EVENTMOUSECMD_LButtonDblClk is not used. 
Warning: pdfium.ew:1563 constant FWL_EVENTMOUSECMD_LButtonUp is not used. 
Warning: pdfium.ew:1562 constant FWL_EVENTMOUSECMD_LButtonDown is not used. 
 
Press Enter for next page or 'q' to quit... 
Warning: pdfium.ew:1544 constant FWL_EVENTTYPE_Key is not used. 
Warning: pdfium.ew:1543 constant FWL_EVENTTYPE_MouseWheel is not used. 
Warning: pdfium.ew:1542 constant FWL_EVENTTYPE_Mouse is not used. 
Warning: pdfium.ew:309 constant DuplexFlipLongEdge is not used. 
Warning: pdfium.ew:308 constant DuplexFlipShortEdge is not used. 
Warning: H:\Euphoriaprog\dax\pdfium.ew:307 constant Simplex is not used. 
Warning: pdfium.ew:306 constant DuplexUndefined is not used. 
 
Press Enter, or d for diagnostics... 

new topic     » goto parent     » topic index » view message » categorize

4. Re: A little help with phix - please

Like this (phix only)?

include builtins\cffi.e 
constant  
tSCOCP = "BOOL WINAPI SetConsoleOutputCP(_In_ UINT wCodePageID);", 
k32 = open_dll("kernel32.dll"), 
xSetConsoleOutputCP = define_cffi_func(k32,tSCOCP), 
CP_UTF8 = 65001 
puts(1,"")  -- force console to exist 
-- the following is equivalent to running "chcp 65001": 
if c_func(xSetConsoleOutputCP,{CP_UTF8})=0 then 
    printf(1,"SetConsoleOutputCP failed\n") 
end if 
 
sequence s = {84,101,105,108,32,86,32,71,101,110,101,114,97,116,105,111,110,32,8211,32,68,101,115,105,103,110,32,8211,32,84,101,115,116,32,8211,32,76,97,117,110,99,104,13,10} 
puts(1,s) 
s = utf16_to_utf8(s) 
puts(1,s) 

As in:
1) yes, that is the exact error I meant, and
2) it would be nice to make that stuff before "sequence s" happen automatically

new topic     » goto parent     » topic index » view message » categorize

5. Re: A little help with phix - please

thank you very much for your advice and help!

with your code it works!

now i still have

"std/types0" 
"std/types" 
"std/types2" 

displayed. how do i get rid of that. Could you, your time permitting, also give me some advice on how and best what from where in phix to include. what are the usual include statements with phix?

richard

new topic     » goto parent     » topic index » view message » categorize

6. Re: A little help with phix - please

Comment out the include std/ as shown above.

That may cause errors, but we can fix those, for instance you may need to take a copy of peek_wstring() from std/machine.e, put it in a new file, say peek_wstring.e, and include it like this:

--/**/include peek_wstring.e 

that is, if you want the same code to run on both phix and OE. Of course it is about time phix had a peek_wstring() of its own (as an autoinclude), I'll do that for the next release.

I also noticed that you are using allocate() and then delete(), which is completely wrong - you need to use free() instead of delete().

new topic     » goto parent     » topic index » view message » categorize

7. Re: A little help with phix - please

thank you for the tips and for pointing out that error.

it would be great to have that in phix and maybe some functions that make life easier with wstrings.

when will there be a new release?

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu