Problems working with Japanese characters found in filenames to determine invalid shortcuts

Hi,
I have written a script that uses test-path to query whether or not *.LNK shortcut files have valid Target Paths to determine whether or not the LNK files should be kept if invalid or contain temporary locations. This works perfectly for most shortcuts with
the exception of those with filenames in Japanese/Chinese/Cyrillic fonts.
The script is made up of the following action:-
gci "$nextdrive\Users\$env:username\AppData\Roaming\microsoft\office\recent" -Filter *.lnk | % { $shell.CreateShortcut( $_.FullName ) } | ? { ( Test-Path ( $_.TargetPath )) -eq $false -or $_.TargetPath -like '*temporary internet files*' -or $_.TargetPath
-like '*temp*'} | % { Remove-item -LiteralPath $_.FullName }
If I run the script when a file name exists in the folder above such as : 1、目录.doc.LNK
the Powershell script from the ISE returns the following error:-
"Cannot bind argument to parameter 'Path' because it is an empty string.
If I rename the .LNK file to something like 12345.doc.LNK, the powershell script successfully removes the file so I know that the issue is certainly related to the actual filename itself. Is there any sort of UTF, CJK or encoding option I need to configure
here for this to work successfully?
Thanks for taking the time to read this!
Andrew

The article Johan linked has some sample code which seems to address your issue (using Shell.Application instead of WScript.Shell). Here's a modification of your code that uses this technique:
$shellApplication = New-Object -ComObject Shell.Application
Get-ChildItem "$nextdrive\Users\$env:username\AppData\Roaming\microsoft\office\recent" -Filter *.lnk |
ForEach-Object {
try
$shortcut = $shellApplication.Namespace(0).ParseName($_.FullName).GetLink
if ((Test-Path -Path $shortcut.Path) -eq $false -or $shortcut.Path -like '*temporary internet files*' -or $shortcut.Path -like '*temp*')
Remove-Item -LiteralPath $_.FullName
catch
Write-Error -ErrorRecord $_
Alternatively, you can use the IShellLink COM class directly.  Looks like someone has already written a .NET wrapper for this: 
http://www.vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating_and_Modifying_Shortcuts/article.asp

Similar Messages

  • Issue with Japanese characters in files/filenames in terminal.

    I recently downloaded a zip file with Japanese characters in the archive and in the files within the archive. The name of the archive is "【批量下载】パノプティコン労働歌 第一等.zip"
    The characters are properly displayed in firefox, chrome, and other applications, but in my terminal some of the characters appear corrupted. Screenshot: https://i.imgur.com/4R22m0D.png
    Additionally, this leads to corruption of the files in the archive. When I try to extract the files, this is what happens:
    % unzip 【批量下载】パノプティコン労働歌 第一等.zip
    Archive: 【批量下载】パノプティコン労働歌 第一等.zip
    extracting: +ii/flac/Let's -+-ʦ1,000,000-.flac bad CRC 5f603d51 (should be debde980)
    extracting: +ii/flac/+ѦѾP++ -instrumental-.flac bad CRC 78b93a2d (should be 3501d555)
    extracting: +ii/flac/----.flac bad CRC ddeb1d3e (should be c05ae84f)
    extracting: +ii/flac/+ѦѾP++.flac bad CRC 0ccf2725 (should be be2b58f1)
    extracting: +ii/flac/Let's -+-ʦ1,000,000--instrumental-.flac bad CRC 67a39f8e (should be ece37917)
    extracting: +ii/flac/.flac bad CRC f90f3aa0 (should be 41756c2c)
    extracting: +ii/flac/ -instrumental-.flac bad CRC 3be03344 (should be 0b7a9cea)
    extracting: +ii/flac/---- -instrumental-.flac bad CRC 569b6194 (should be adb5d5fe)
    I'm not sure what could be the cause of this. I'm using uxterm with terminus as my main font and IPA gothic (a Japanese font) as my secondary font. I have a Japanese locale set up and have tried setting LANG=ja_JP.utf8 before, but the results never change.
    Also, this issue isn't just with this file. This happens with nearly all archives that have Japanese characters associated with it.
    Has anyone encountered this issue before or knows what might be wrong?
    Last edited by Sanbanyo (2015-05-21 03:12:56)

    Maybe 7zip or another tool has workarounds for broken file names, you could try that.
    Or you could try to go over the files in the zip archive one-by-one and write it to files out-1, out-2, ..., out-$n without concerning yourself with the file names. You could get file endings back via the mimetype.
    This script might work:
    #include <stdio.h>
    #include <zip.h>
    static const char *template = "./out-%04d.bin";
    int main(int argc, char**argv)
    int err = 0;
    zip_t *arc = zip_open((const char*)argv[1], ZIP_RDONLY, &err);
    if(arc == NULL)
    printf("Failed to open ZIP, error %d\n", err);
    return -1;
    zip_int64_t n = zip_get_num_entries(arc, 0);
    printf("%s: # of packed files: %d\n", argv[1], n);
    for(int i = 0; i < n; i++)
    zip_stat_t stat;
    zip_stat_index(arc, i, ZIP_FL_UNCHANGED, &stat);
    char buf[stat.size];
    char oname[sizeof(template)];
    zip_file_t *f = zip_fopen_index(arc, (zip_int64_t)i, ZIP_FL_UNCHANGED);
    zip_fread(f, (void*)&buf[0], stat.size);
    snprintf(&oname[0], sizeof(template), template, i);
    FILE *of = fopen(oname, "wb");
    fwrite(&buf[0], stat.size, 1, of);
    printf("%s: %s => %lu bytes\n", argv[1], oname, stat.size);
    zip_fclose(f);
    fclose(of);
    zip_close(arc);
    return 0;
    Compile with
    gcc -std=gnu99 -O3 -o unzip unzip.c -lzip
    and run as
    ./unzip $funnyzipfile
    You should get template-named, numbered output files in the current directory.
    Last edited by 2ion (2015-05-21 23:09:29)

  • Problem in working with Japanese data

    Hello,
    We have an application, which should work for both English and Japanese languages. Our application is working fine for English data but in case of Japanese, we are facing problems. In the application, there is a language setting, where the user can select either English or Japanese. This changes the language of the labels to English or Japanese. We are handling this thru' ResourceBundles. But the data that is entered can be independent of this. In English setting also, the data entered or diplayed could be Japanese. Now we are facing problems at vaious places -
    1. When we enter Japanese data and save it, it gets copied into the bean and if there is any error in the saving, the same data from bean comes back on the screen. This data doesn't appear properly in Japanese.
    2. When we try to retrieve the already saved data from database, it doesn't show poperly in Japanese.
    We are using our own 'toUnicode' function, which converts the data to Unicode before saving the data to database. Similarly, we have tried different encodings like SJIS / Shift_JIS / ISO-2022-JP at various places i.e. in 'Page' directive or in HTML Meta tag or various combinations of these two. Nothing is working reliably. Sometimes for some combination, data retained in the first case is correct but it can't be saved. Sometimes it works with Unicode, sometimes without Unicode. Some combination affects the Japanese labels as well. Otherwise the labels at least are displayed properly.
    The same code with just Shift_JIS setting in 'page' directive, worked well in IIS Server for both English and Japanese.
    What could be the problem in WebLogic? Does it matter if WL is installed on English or Japanese machine?
    Kindly answer ASAP, since the project is getting delayed.
    Thanking in anticipation...
    -Medha

    Hi,
    is there a difference in handling Japanese and Chinese chars? If not I
    might be able to give you some hints.
    Daniel
    -----Original Message-----
    From: JSB [mailto:[email protected]]
    Posted At: Monday, February 12, 2001 6:22 PM
    Posted To: internationalization
    Conversation: Problem in working with Japanese data
    Subject: Re: Problem in working with Japanese data
    Have u solved this yet, and how ?
    Medha <[email protected]> wrote in message
    news:[email protected]...
    >
    Hello,
    We have an application, which should work for both English andJapanese
    languages. Our application is working fine for English data but in case
    of
    Japanese, we are facing problems. In the application, there is a
    language
    setting, where the user can select either English or Japanese. This
    changes
    the language of the labels to English or Japanese. We are handling this
    thru' ResourceBundles. But the data that is entered can be independent
    of
    this. In English setting also, the data entered or diplayed could be
    Japanese. Now we are facing problems at vaious places -
    1. When we enter Japanese data and save it, it gets copied into thebean
    and if there is any error in the saving, the same data from bean comes
    back
    on the screen. This data doesn't appear properly in Japanese.
    2. When we try to retrieve the already saved data from database, itdoesn't show poperly in Japanese.
    We are using our own 'toUnicode' function, which converts the datato
    Unicode before saving the data to database. Similarly, we have tried
    different encodings like SJIS / Shift_JIS / ISO-2022-JP at various
    places
    i.e. in 'Page' directive or in HTML Meta tag or various combinations of
    these two. Nothing is working reliably. Sometimes for some combination,
    data
    retained in the first case is correct but it can't be saved. Sometimes
    it
    works with Unicode, sometimes without Unicode. Some combination affects
    the
    Japanese labels as well. Otherwise the labels at least are displayed
    properly.
    The same code with just Shift_JIS setting in 'page' directive,worked
    well in IIS Server for both English and Japanese.
    What could be the problem in WebLogic? Does it matter if WL isinstalled on English or Japanese machine?
    Kindly answer ASAP, since the project is getting delayed.
    Thanking in anticipation...
    -Medha

  • Working with Chinese characters: How to paste and modify them as sentences; not as individual images?

    Working with Chinese characters: How to paste and modify them as sentences; not as individual images?
    From 2004, this is so far the most detailed answer I could find: http://en.allexperts.com/q/Adobe-Illustrator-1027/FONTS-display-problem-Adobe.htm, but is this really still the most up-to date solution?
    Is it possible at all to work with Chinese characters, if I don't have the Chinese version of Illustrator? (http://www.proz.com/forum/dtp_desktop_publishing/221125-chinese_in_indesign.html)

    Thanks for your reply.
    I'm using Version 17.1.0 (64-bit) - basically CS6.
    Operating system is Windows 8.1. Installed is the simplied Chinese language package.
    I have received the text in a Word document. It contains mixed characters, something like this:
    教授资料
    学术背景:
      博士;曾于波恩大学(Rheinische Friedrich-Wilhelms-Universität Bonn)、台湾师范大学、
    I have tried to paste it in the two following ways:
    1) to create a text box and paste the text. The result is that some of the characters are not showed correctly.
    2) Paste it directly without any preparation. This result into a single "image" or group of images. I can cancel modify each character one at a time, or I can dissolve the group, but the result is the same.

  • ASP application has problems working with oracle database 8.1.7

    ASP application has problems working with oracle database 8.1.7 through both oracle ODBC driver and Microsoft ODBC driver
    We have an ASP application running on Windows 2000 server, and with 8.1.7 Net8Client and MDAC 2.6 SP1.
    The application worked fine with an Oracle 8.0.5 database.
    After upgrading oracle database to 8.1.7.0.0, our ASP application works fine except when updating the same data record more than once. The application is not saving our updates.
    We tested our application using Oracles ODBC driver v8.1.7.5.0
    and experienced more problems. We had problems just bring up our data entry pages. In either case, we are returned with some 505 errors in our browser, problems with the ASP pages and IIS, the page is not displaying.
    If anyone has some suggestions on how to fix my problem, please advise. Thanks in advance.

    thanks...i saw one article with this approach..but the document did not present the detailed process...do you have one? i am still searching for a good procedure to follow...since it is an old database and focusing/studying old versions like this is a pain in the a**... :(

  • Need to work with japanese language

    hi friends,
    i want to work with japanese languge.
    i had searched in sdn forums for documents related to language but
    i can't find the proper solution
    my main requirement is
    1.if i log in with japanese language can i get output in english ..?
    2.what should be done with zreports when i am installed japanese language..?
    3.what are the needs for these language installation
    can any one give the proper solution.
    thanks in advance.
    regards,
    karunakar

    hi Nils,
    thanks for your quick reply
    sorry for not giving exact requirement ,here i am giving clear description about the requirement
    1.output means here i am login with Japanese
       can i get output for description & fields of report/script/smartform in english ?
       and viceversa ?
    2.how are the  Zreports taken care off when japanese language is installed ?
    3.need means
       what are the prerequisites for japaneese language installation ?
       weather it may be software or hardware ?
    Regards,
    karunakar

  • Oracle Report Server Issue with Japanese Characters

    We are trying to setup a Oracle Report Server to print the Japanese characters in the PDF format.
    We have separate Oracle Report servers for printing English, Chinese and Vietnamese characters in PDF formats using Oracle Reports in the production which are running properly with Unix AIX version 5.3. Now we have a requirement to print the Japanese characters. Hence we tried to setup the new server for the same and the configurations are done as same as Chinese/Vietnamese report servers. But we are not able to print the Japanese characters.
    I am providing the details which we followed to configure this new server.
    1.     We have modified the reports.sh to map the proper NLS_LANG (JAPANESE_AMERICA.UTF8) and other Admin folder settings.
    2.     We have configured the new report server via OPMN admin.
    3.     We have copied the arialuni.ttf to Printers folder and we have converted this same .ttf file in AFM format. This AFM file has been copied to $ORACLE_HOME/guicommon/gk/JP_Admin/AFM folder.
    4.     We have modified the uifont.ali (JP_admin folder) file for font subsetting.
    5.     We have put an entry in JP_admin/PPD/datap462.ppd as *Font ArialUnicodeMS: Standard "(Version 1.01)" Standard ROM
    6.     We have modified the Tk2Motif.rgb (JP_admin folder) file for character set mapping (Tk2Motif*fontMapCs: iso8859-1=UTF8) as we have enabled this one for other report servers as well.
    Environment Details:-
    Unix AIX version : 5300-07-05-0831
    Oracle Version : 10.1.0.4.2
    NLS_LANG : JAPANESE_AMERICA.UTF8
    Font Mapping : Font Sub Setting in uifont.ali
    Font Used for Printing : arialuni.ttf (Font Name : Arial Unicode MS)
    The error thrown in the rwEng trace (rwEng-0.trc) file is as below
    [2011/9/7 8:11:4:488] Error 50103 (C Engine): 20:11:04 ERR REP-3000: Internal error starting Oracle Toolkit.
    The error thrown when trying to execute the reports is…
    REP-0177: Error while running in remote server
    Engine rwEng-0 crashed, job Id: 67
    Our investigations and findings…
    1.     We disabled the entry Tk2Motif*fontMapCs: iso8859-1=UTF8 in Tk2Motif.rgb then started the server. We found that no error is thrown in the rwEng trace file and we are able to print the report also in PDF format… (Please see the attached japarial.pdf for your verification) but we are able to see only junk characters. We verified the document settings in the PDF file for ensuring the font sub set. We are able to see the font sub setting is used.
    2.     If we enable the above entry then the rwEng trace throwing the above error (oracle toolkit error) and reports engine is crashed.
    It will be a great help from you if you can assist us to resolve this issue…

    Maybe 7zip or another tool has workarounds for broken file names, you could try that.
    Or you could try to go over the files in the zip archive one-by-one and write it to files out-1, out-2, ..., out-$n without concerning yourself with the file names. You could get file endings back via the mimetype.
    This script might work:
    #include <stdio.h>
    #include <zip.h>
    static const char *template = "./out-%04d.bin";
    int main(int argc, char**argv)
    int err = 0;
    zip_t *arc = zip_open((const char*)argv[1], ZIP_RDONLY, &err);
    if(arc == NULL)
    printf("Failed to open ZIP, error %d\n", err);
    return -1;
    zip_int64_t n = zip_get_num_entries(arc, 0);
    printf("%s: # of packed files: %d\n", argv[1], n);
    for(int i = 0; i < n; i++)
    zip_stat_t stat;
    zip_stat_index(arc, i, ZIP_FL_UNCHANGED, &stat);
    char buf[stat.size];
    char oname[sizeof(template)];
    zip_file_t *f = zip_fopen_index(arc, (zip_int64_t)i, ZIP_FL_UNCHANGED);
    zip_fread(f, (void*)&buf[0], stat.size);
    snprintf(&oname[0], sizeof(template), template, i);
    FILE *of = fopen(oname, "wb");
    fwrite(&buf[0], stat.size, 1, of);
    printf("%s: %s => %lu bytes\n", argv[1], oname, stat.size);
    zip_fclose(f);
    fclose(of);
    zip_close(arc);
    return 0;
    Compile with
    gcc -std=gnu99 -O3 -o unzip unzip.c -lzip
    and run as
    ./unzip $funnyzipfile
    You should get template-named, numbered output files in the current directory.
    Last edited by 2ion (2015-05-21 23:09:29)

  • Having a problem in displaying Japanese characters in JSP

    Hi, Could someone pls help me out with this...
    I'm trying to implement my application(in Java) in English, French and Japanese languages. For this purpose, I have used ResourceBundle class. I have no problem in implementing English and French versions as they are all in Unicode.
    For Japanese version, I have used a tool called NJStar Editor to create a properties file in Japanese and am saving the file with format:"Shift-JIS Text File".
    Then I run native2Ascii <fileCreated><asciiConvertedFile>.
    I see that the asciiConvertedFile has converted text such as "wfm_wla_filter=\u30d5\u30a3\u30eb\u30bf\u30fc".
    I'm calling this variable from a JSP using <%=bundle.getString("wfm_wla_filter")%>. In the JSP i include <%@ page contentType="text/html; charset=Shift_JIS" %> to take care of the Japanese content.
    The final result that is displayed in the browser is not Japanese. It is either some garbage that is not understandable or it is just "??????".
    Could you pls tell me where I might have gone wrong in the any of the procedures that I have mentioned above.
    Thanks in advance
    Satish

    Hi,
    I think you need to look at this as a two-step problem.
    First, you need to get the external characters from a file into the JVM. The java.util.Properties object doesn't know how to handle Shift-JIS, UTF-8, etc. According to the JavaDoc, Properties.load only understands ISO 8859-1. So, the native2ascii tool converts your Shift_JIS files into something that Properties can load. During the Properties.load process, the bytes from the properties file get converted into 2-byte Unicode characters, the only format the JVM deals with.
    Second, you need send Shift-JIS bytes back to your browser. So, you need to convert Java Strings into a Shift-JIS encoded byte stream. Here's an example of how to send Shift-JIS bytes to the browser using basic Java objects:
    <%@ page contentType="text/html; charset=Shift-JIS" %>
    <%
    ResourceBundle rb =
    ResourceBundle.getBundle("MyResources", Locale.JAPAN);
    String someMessage = rb.getString("someMessageKey");
    writer.print(someMessage);
    %>
    Note that since you declared the charset as Shift-JIS, the JSP writer should send the bytes in someMessage in the response stream as Shift_JIS encoded. Under the covers, the JSP container should interpret your contentType declaration and embed a new OutputStreamWriter(out, "Shift-JIS") into the JSP Writer. In the old days with Servlets, we had to work with OutputStreams directly using OutputStreamWriter. (Note: might be SJIS vs. Shift-JIS depending on your JDK).
    Lastly, I strongly recommend that you use the JSTL i18n (prefix fmt) tags for developing i18n/l10n support into your Web application vs. re-inventing the wheel.
    Best regards,
    Timothy Potter

  • Problem Working With Framemaker 9 Dita XML Files in Framemaker 10

    I just upgraded to Framemaker 10. I am encountering a number of problems when I try to work with my Dita XML help topics, which were last saved in Framemaker 9 format.
    1. Using the Default Dita Template
    When I open one of my documents in Framemaker 10, the Dita 1.2 template ditabase.fm is automatically applied. Everything seems fine. But then when I convert the XML to Eclipse help (which is essentially html, so we're going from XML to HTML) using Dita Open Toolkit ant scripts, I see this message:
    [pipeline] [DOTJ013E][ERROR] Failed to parse the referenced file 'html\c_licensing.xml' due to below exception. Please correct the reference base on the exception message.
    [pipeline] c_licensing.xml Line 25:Attribute "xmlns:ditaarch" must be declared for element type "dita".
    I then opened the xml  file in a text editor, and I saw this on line 25:
    <dita xmlns:ditaarch = "http://dita.oasis-open.org/architecture/2005/">
    Line 25 looks fine to me. Am I missing something? 
    2. Switching to a 1.1 Dita Template
    I tried to work around the above problem. In Framemaker, I tried to set a different structured application as the default one. I closed all files and chose the default Dita 1.1 structured application (it defaults to the Dita 1.1. Composite app.)
    Then I tried to open my file: I got this message inside Framemaker:
    "Validation of XML failed. Continue?
    Error at [FILE PATH], line 25, char 72, Message: Attribute '{http://www.w3.org/2000/xmlns/}ditaarch' is not declared for element 'dita'
    Sounds familiar, doesn't it?
    I switched from the default Dita 1.1. Composite structured application to the Dita 1.1. Topic structured application. Then I dirtied the source file and saved it. The messages I got in FrameMaker log window included the one above, plus I got a variety of Unknown Element messages, things like this:
    Unknown element dita,
    unknown element concept,
    various attributes are not declared for concept,
    unknown element conbody.
    If I switch back to the Dita 1.1 Composite application all of these messages diappear except for this one:
    Attribute '{http://www.w3.org/2000/xmlns/}ditaarch' is not declared for element 'dita'
    My ant conversion scripts from the Dita Open Toolkit are still unable to process this file. They give the same message as is listed in (1) above and the file is not converted to HTML.
    Can anyone help me with this problem? I've also posted this question to the Dita Users Group on Yahoo Groups. If I get an answer in one place, I'll post it in the other.
    Thanks,
    Nina P.

    I really appreciate all the help you are providing with this, Scott. I tried your latest suggestions. Here's what happened:
    Application Mappings:
    I figured out how to add my "BigPage" structured application to the Applications Mappings dialog. I made a new "BigPage"  mapping type, then figured out the non-intuitive part: how to add my individual BigPage topic types to it.  I closed and reopened FrameMaker opened my test document, and, as before (before I did the application mappings) I saw my BigPage applications listed in the Structure Tools > Set Structured Application drop-down. I selected the appropriate application (in this case it was DITA1.1-BigPage-Reference-FM and clicked the "Set" button. 
    It is at this point in Framemaker 9 (and also once, in FrameMaker 10, early in this process, but I haven't been able to replicate it since) that the page size would change to tabloid size, indicating that the document was using the template from the BigPage reference structured application, not the regular DITA1.1 reference application. But this did not happen.
    I tried saving the document, closing it, and reopening it. Once again the default structured application assigned to that document was "reset" to DITA1.1-Reference-FM.  But the fact that the page size did not immediate refresh to tabloid size told me that although I did select the BigPage application in the drop-down, it wasn't being applied.
    Public IDs:
    The public ID in my test reference XML file is:  <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd" [
    The four public IDs in the DITA1.1-BigPage-Reference-FM entry in structapps.fm (in the Entity Locations section) are:
    -//OASIS//DTD DITA Reference//EN 
    -//IBM//DTD DITA Reference//EN
    -//OASIS//DTD DITA Composite//EN
    -//IBM//DTD DITA Composite//EN
    Do you see anything wrong with the above? .
    Directory Structure: 
    Maybe I cloned the application incorrectly?  Here's what I did:
    1. In C:\Program Files (x86)\Adobe\AdobeFrameMaker10\Structure\xml, I copied the folder called DITA and pasted it into the same directory. I renamed this folder DITA-BigPage
    2. Inside DITA-BigPage, I opened the app folder. Inside each subfolder in app, DITA-Reference-FM, for example, I opened the edd file in Framemaker. In this case, the edd file name was reference.edd.fm.
    3. I edited the top line of reference.edd.fm.  It originally said:
    Structured Application: DITA1.1-Reference-FM.
    I changed it to say:
    Structured Application: DITA1.1-BigPage-Reference-FM
    4. I saved the EDD file. Then I opened the template file in the same folder. It was called: reference.template.fm.
    5. In reference.template.fm, I first changed my page size: Format Menu > Page Layout > Page Size > Tabloid > Set.
    6. Then I imported the element definitions from the corresponding EDD file:  File > Import > Element Definitions > reference.edd.fm > Click Import > Click OK to dismiss verification message.
    7. I repeated the above process for all topic-type folders. For the maps types, I did not change the page size, as these will never display as topics in my online  help. I did nothing to the dtd folder.
    8. Once all this was done, I opened structapps.fm.  I did the following to all Dita1.1 elements in the structure tree.
    Selected the Dita 1.1 XMLApplication element, for instance, the one named Dita1.1-Reference-FM, copied it, and pasted it underneath the original element.
    The original first few lines in the clone looked like this:
    Application Name: DITA1.1-Reference-FM
          Template:              $STRUCTDIR\xml\DITA\app\DITA-Reference-FM\reference.template.fm
          DTD:                       $STRUCTDIR\xml\DITA\app\dtd\reference.dtd
          Read/write Rules:  $STRUCTDIR\xml\DITA\app\DITA-Reference-FM\reference.rules.fm
          DOCTYPE:              reference
    I changed these lines to look like this, using your suggestion to create a variable for the first part of the URLs to enable speed and accuracy:
           Application Name:      DITA1.1-BigPage-Reference-FM
                   Template:                    $STRUCTDIR\xml\DITA-BigPage\app\DITA-Reference-FM\reference.template.fm
                   DTD:                            $STRUCTDIR\xml\DITA-BigPage\app\dtd\reference.dtd
                   Read/write Rules:        $STRUCTDIR\xml\DITA-BigPage\app\DITA-Reference-FM\reference.rules.fm
                   DOCTYPE:                    reference
    I also changed the "Filename" URLs in the "Entity Locations" section of this XMLApplication clone from  $STRUCTDIR\xml\DITA\app\  to $STRUCTDIR\xml\DITA-BigPage\app\.  Applying the "BigPage" variable I'd created for this purpose made this go quickly.
    Finally, after this didn't work the first few times I tried it, I got suspicious that the structapps.fm file in my AppData folder (in my case, it was in the Roaming subfolder under the usual Adobe directories) was overriding the modified structapps.fm file in the Framemaker program directory so I replaced the one in AppData (it had all the original settings) with my modified version.  This had no effect, unfortunately.
    That was my process. After doing the above, the Dita1.1-BigPage applications all listed in the Set Structured App drop-down. They just didn't work,when applied to my XML documents. Nor did the application "remember" what structured application I had set when I opened a new xml document  or closed/reopened the current document or closed/reopened the application.  Did I place the directories correctly for Framemaker 10?  This is the way I did it for FrameMaker 9 and it worked successfully.
    As much as I'd love to solve this mystery, I've thought of a workaround I can fall back on  that doesn't involve using a cloned application.  I will change the page size of a few of the original Dita1.1 sturctured application templates to tabloid size, but leave the Topic structured application at letter size. I'll then apply the Topic structured application to my PDFs and use the others for my help topics.  I'll set this up now. If this doesn't work, then I'll know there's a much bigger problem at the base of this, perhaps even something to do with changing page sizes in templates.

  • Problem in displaying Japanese characters in SAPScripts

    Hi All,
    I am facing a strange problem in one of my SAPScripts. I have one script in both English and Japanese languages. The scripts are already existing. I had to do some minor changes in a logo window. I did them and i did not do any other changes in any of the windows.
    When the output wa s seen for the script in the Japanese version, it was looking ok displaying all hte Japanese characters in various windows. Now, during testing , in the same server, the Japanese characteres are not shown. Instead , some ' #'(hash) symb ols are getting displayed.
    How could it happen? Did any body face such problem? If so, can anybody plz help me out with the solution?
    What shud i do to get back the Japanese characters in my script again?
    Regards,
    Priya

    Priya.
    this is not an ABAP problem ask your BASIS team to set printer cofing from SPAD.dont worry its not an ABAP issue at all.
    sometime printer doesnt support special char so it need to be setting with printer.
    Amit.

  • Problem ,working with UNTIL TIME..

    hi
    i have a serious problem when issuing UNTIL TIME commends.
    Such as this command in RMAN:
    run {
    backup
    (archivelog from time '02-OCT-06 09.00.00'
    until time '03-OCT-06 21.00.00');
    or working with UNTIL TIME in point-in-time recovery .
    it gives me this error:
    ORA-01830: date format picture ends before converting entire input string
    i have had this problem for a long time and i haven't found a solution for it.
    i will be grateful if anyone can help me beat this problem

    Try this:
    run {
    set until "to_date('01-10-2006','dd-mm-yyyy')";
    Best Regards
    Krystian Zieja / mob

  • Collation issue with Japanese characters in Oracle8i

    Hi,
    I have japanese data in a varchar2 column in an Oracle8i instance which contains both single byte and multibyte Japanese characters. The encoding type of the instance is UTF-8.
    I want to sort them in such a way that equivalent single byte and multibyte Japanese characters are treated as same. Also while selecting, if I specify the single byte characters in the where condition it should select both single and double byte characters and vice-versa.
    The functionality I'm looking for is similar to the one which can be achieved by using Collator class in Java with FULL_DECOMPOSITION as decmposition mode.
    Could anyone please let me know how can I do it ?
    Thanks in advance.
    Best Regards,
    Sourav

    Maybe 7zip or another tool has workarounds for broken file names, you could try that.
    Or you could try to go over the files in the zip archive one-by-one and write it to files out-1, out-2, ..., out-$n without concerning yourself with the file names. You could get file endings back via the mimetype.
    This script might work:
    #include <stdio.h>
    #include <zip.h>
    static const char *template = "./out-%04d.bin";
    int main(int argc, char**argv)
    int err = 0;
    zip_t *arc = zip_open((const char*)argv[1], ZIP_RDONLY, &err);
    if(arc == NULL)
    printf("Failed to open ZIP, error %d\n", err);
    return -1;
    zip_int64_t n = zip_get_num_entries(arc, 0);
    printf("%s: # of packed files: %d\n", argv[1], n);
    for(int i = 0; i < n; i++)
    zip_stat_t stat;
    zip_stat_index(arc, i, ZIP_FL_UNCHANGED, &stat);
    char buf[stat.size];
    char oname[sizeof(template)];
    zip_file_t *f = zip_fopen_index(arc, (zip_int64_t)i, ZIP_FL_UNCHANGED);
    zip_fread(f, (void*)&buf[0], stat.size);
    snprintf(&oname[0], sizeof(template), template, i);
    FILE *of = fopen(oname, "wb");
    fwrite(&buf[0], stat.size, 1, of);
    printf("%s: %s => %lu bytes\n", argv[1], oname, stat.size);
    zip_fclose(f);
    fclose(of);
    zip_close(arc);
    return 0;
    Compile with
    gcc -std=gnu99 -O3 -o unzip unzip.c -lzip
    and run as
    ./unzip $funnyzipfile
    You should get template-named, numbered output files in the current directory.
    Last edited by 2ion (2015-05-21 23:09:29)

  • Working with japanese and other char sets..

    Hey all,
    I primarily use XML Pull parsing becuase of its speed and my lack of need to validate a document.
    One problem we are having is saving text input by a user into an xml when it is japanese characters. We can clearly see the japanese characters in the text field.
    I have tried setting the encoding to utf-8, utf-16 and ucs-2. When I set it to utf-16, the output gets all garbled and it cant be read. Actually, in fairness, I am using a basic file writer and building up a StringBuffer with the xml I want, where I put the declaration tag at the top in and write it all out. At least on the mac, when I open the xml with textedit, I see a slew of japanese characters but no valid xml. Somehow it turns the entire file into japanese and not just the values within quotes.
    What's the trick in writing xml out and reading it back in so that various languages can be saved and restored?
    Thank you.

    I am using a basic file writer and building up a StringBuffer with the xml I want,That isn't the trick. The trick is to use a FileWriter that has been set up to use the same encoding you put into the XML document's prolog. Just having the XML document declare that it's encoded in UTF-8 doesn't make it be encoded in UTF-8, that is your responsibility. Like this:Writer w = new OutputStreamWriter(new FileOutputStream(...), "UTF-8"));And make sure you have a text editor that can understand UTF-8 and also render Japanese characters properly.

  • Problem in displaying Japanese characters on the browser.

    Hi Friends,
    Hope one of you could help me in this!!
    We are using SHIFT_JIS character encoding in our jsps to display Japanese characters.
    <%@ page contentType="text/html; charset=SHIFT_JIS" %>
    Is there any other configuration required on server side to let the Japanese characters being displayed? Because what I am getting on screen is quite annoying. Well something like below.
    ?V?M???????�
    Even though my knowledge in Japs isn't too good :-)) I can understand that these are not Japanese. I believe I am missing something in terms of server side configuration, Can anybody point that out. (Maybe some of the Japanese developers in here).
    This could not be a client side issue, since from the same machine I can access other Japanese sites and they display properly. Let me know if anybody can help.
    I am running these in WAS 5.0
    Thanks,
    King

    Your text in the JSP should be UTF-8 nevertheless - as would be ideal
    for internationalization. Java comes with a command-line conversion tool
    native2ascii which is bidirectional.
    As non-Japanese I am not certain whether "SJIS" might not be better (there
    are some name variations in java).
    The HTML generation will translate these characters to SHIFT_JIS in your case.
    Where the target encoding cannot handle the intended character it receives a
    question mark - hat you saw.
    Furthermore you need a proper font in HTML and under Windows (window title).
    Your webserver should have east-asian support. Though Japanese (and English)
    are standard, I, as non-japanese am not certain about SHIFT_JIS.
    Also there is some freedom in choice for a japanese encoding.

  • Router Problem - Works with Windoze, Linux, but not with Mac

    I can't seem to get any router to work with my Mac.
    I've tried a Linksys 'b' router, a Netgear 'g' router and a Belkin 'g' router.
    No joy.
    When I connect my Mac directly to my cable modem (Motorola Surfboard), there are no issues. When I connect the router in between, the Mac pulls the proper ip address and I can ping the router, but I can't get any further. If I try to ping an outside ip address (such as the 4.2.2.2 dns) I get the error message "ping: sendto: Cannot allocate memory". [Does anyone know what this message means?]
    A second computer (IBM NetVista) connects reliably using Windoze XP. The same machine, booted in CentOS also connects reliably (after disabling the firewall).
    Note, these are all wired connections. I'm not even trying to use wireless yet. The cables all check out, since they all work in other configurations (the Mac->router cable is the same one I use for Mac->Surfboard, and the router->surfboard cable works when connecting from the NewVista machine.
    I thought the Mac problems might be firewall related. I had "Brickhouse" installed,but it has since been removed. My network settings no long advise that there is any firewall software in place (previously Sharing > Firewall was greyed out with message that other firewall software was installed). Sharing > Firewall now reports "Firewall Off".
    I know the routers work, since I can connect from the NetVista machine. I know the cables are good, because they all work in other configurations. I know the Mac is seeing the router, and the router is seeing the Mac because a correct ip address is pulled. I can even communicate between the machines (ftp,ssh) but I can't get internet access using the Mac through the router.
    Oh yeah... one other oddity. When I have personal web sharing enabled, an attempt to access the router setup page at 192.168.1.1 fetches the local server index.html page instead of accessing the router. When web sharing is off, I get a "you are not connected to the internet" message.
    Any insight?

    Very strange indeed!
    Only 2 suggestions at this point...
    Get Applejack...
    http://www.versiontracker.com/dyn/moreinfo/macosx/19596
    After installing, reboot holding down CMD+s, then when the prompt shows, type in...
    applejack AUTO
    Then let it do all 5 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 5 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.
    Try dragging these files to the Desktop & Reboot...
    /Users/nnnn/Library/Preferences/com.apple.internetconnect.plist
    /Library/Preferences/SystemConfiguration/preferences.plist
    /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
    /Library/Preferences/com.apple.sharing.firewall.plist

Maybe you are looking for