#1
|
|||
|
|||
![]()
I used to be able to open the XML files with FP8 in BBEdit on the Mac. But now with FP9, the XML files are 16-bit, and I can not find a way to edit them with BBEdit. I've tried different settings with BBEdit, but still cannot figure it out. Very Frustrating.
Anyone know of a workaround, another editor of some sort. Again, I'm on a Mac. Scott FP 9.1.3 on Mac 10.9.5 with Acrobat 10.1.10 |
#2
|
||||
|
||||
![]()
Scott, I had a similar issue. I'm not working with XML files, but the change to 16-bit broke some scripts that I run on my FusionPro .msg logs after composition. In order to compensate for that, I wrote a bash script that will convert the file(s) (in my case I'm batch processing data) back to ascii format to conform to my workflow. This may work for you as well:
Code:
file -I /path/to/file.xml Quote:
Depending on how many files you're actually editing, you might find it easier to open the file in a text editor like Sublime Text and click File > Save with encoding > UTF-8.
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 Last edited by step; July 29th, 2015 at 09:44 AM.. Reason: Added simpler solution |
#3
|
|||||
|
|||||
![]() Quote:
Yes, every text file generated by FusionPro is now 16-bit UTF-16 (actually UCS-2). This allows for full support for Japanese, Chinese, or any other language for anything FusionPro uses, including the names of colors, fonts, variables, rules, etc. (It was actually something we should have done a long time ago; being bought by a Japanese company has a way of hurrying these kinds of things along.) Quote:
TextEdit? Xcode? TextWrangler? Any editor from this century? Seriously, almost every Mac app supports Unicode these days. Quote:
Quote:
Quote:
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#4
|
||||
|
||||
![]()
The script that I had to revise checked for composition time errors and parsed out information that I printed to the .msg log from my FP templates at the end of batch compositions. Information like: total pieces to print, total number of press sheets, job number, etc. This is all information that our planning department requires and since a composition can produce upwards of 80-something files, I scripted that in lieu of manually checking every log file.
Quote:
And just for full disclosure, I have very little idea what I'm talking about when it comes to text encoding.
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#5
|
||||
|
||||
![]() Quote:
So yes, in FusionPro 9.2, the built-in XML Templates are now UTF-16, because, as you can see if you open one up, FusionPro now supports Japanese and Chinese names, descriptions, comments, etc., as well as the older 8-bit languages. Thus, Unicode support is required. However, even though the rules that come with FusionPro are 16-bit, you can still create your own XML Template Rule files as ASCII or any other 8-bit format, and put them in the "/Library/Application Support/PTI/FusionPro/Plug-ins/Template XML" folder (or the corresponding Program Files subfolder on Windows), and FusionPro will still read them just fine. So, I'm now puzzled as to why you need to open up the built-in XML Templates, which come installed with FusionPro, at all. We neither recommend nor support modifying the XML Template rules which come with FusionPro. You can always make copies of them, but please don't modify the original files. And if you have saved off the older 8-bit XML Template rules from a previous version of FusionPro, you can still make copies of those, edit them as 8-bit, and add them to that Plug-ins subfolder. So I don't really see why you now suddenly need a Unicode-aware editor to do that. Quote:
Code:
FusionPro.Composition.CreateXMLLogFile(); You will need to add a couple of lines for some of your custom information, like the job number. Something like this, maybe in OnRecordStart: Code:
FusionPro.Composition.LogXMLMetadata("Job Number", Field("Job Number")); Quote:
It can be complicated. But in many ways, UTF-16 is the simplest format for (UCS-2) Unicode, as you don't have to deal with UTF-8 escapes. And we always put out a UTF-16 byte order mark, which almost any app or utility from this century will recognize. But you shouldn't really have to know much about all that; things should just work, if your tools are anywhere close to up-to-date.
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() Last edited by Dan Korn; July 29th, 2015 at 11:51 AM.. |
#6
|
||||
|
||||
![]() Quote:
Quote:
__________________
Ste Pennell FusionPro VDP Creator 9.3.15 Adobe Acrobat X 10.1.1 Mac OS X 10.12 |
#7
|
|||
|
|||
![]() Quote:
Before I could just open the XML in BBEdit and read it. I do not plan on editing the base templates, I just want to create my own. |
#8
|
||||
|
||||
![]() Quote:
If it looks right in TextEdit, but wrong in BBEdit, then there's some kind of problem with BBEdit or its configuration, which means that your question is really about BBEdit, not about FusionPro, and therefore is outside the scope of this forum. If the XML file also looks wrong in TextEdit, then please post it here so I can take a look. I'm still not sure why you can't just take one of the older 8-bit XML templates that you built previously and build off of that. At any rate, though, even if BBEdit is not working for some reason, you should be able to use TextEdit, or just about any other editor.
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#9
|
|||
|
|||
![]()
The XML shows the same way in TextEdit.
Here is a screenshot of what I see in TextEdit. And here is the XML file, I'm trying to open. Scott Mac 10.9.5 BBEdit 10.5.13 TextEdit 1.9 Acrobat 10.1.10 FP 9.3.12 |
#10
|
||||
|
||||
![]()
Okay, thanks for attaching that. The attachment is literally worth a thousand words.
Yes, that XML file appears to be corrupted. It looks like an 8-bit file which erroneously has a UTF-16LE byte order mark in front of it. If I open up the file in a binary editor and delete the first two bytes (the UTF-16 marker), it then becomes a valid 8-bit (Latin-1/ANSI) XML file. I've attached it here. Now that I can actually see the file you're talking about, I see that it's not actually a Template XML Rule, as I had assumed from the sub-forum you posted in. It's actually an HTML Form Definition file, generated from the Web DataCollect dialog. You could have saved us all quite a bit of time if you had made it clear from the start that you were talking specifically about the XML generated by the HTML Form / Web DataCollect dialog, or if you had bothered to answer the question right at the start of my first post in this thread: Quote:
Anyway, it seems that you have uncovered a subtle bug which wasn't caught in our QA testing. This is probably because, when you click the Preview Form button on that Web DataCollect dialog, the XML file, while malformed, still is (somehow) successfully processed by the XSL transformation which converts it to the HTML page, which does appear properly in the web browser. Since that all seems to work, our QA team never thought to actually open up the XML file to see if it shows up properly in an editor. So this really IS a bug in FusionPro. But it's not a general problem with how FusionPro generates 16-bit files; it's very specifically a problem with how that Web DataCollect dialog creates the XML file that represents the HTML Form Definition, on Mac. (On Windows, the file is generated correctly.) Now that I know what the actual bug is, I can enter a specific bug report about it. But I can't tell you when it will be fixed. As a workaround, I'm able to get the file back into a human-readable state by opening it up in TextWrangler or BBEdit, then from the menu, selecting File -> Reopen Using Encoding -> Western (ISO Latin 1), then deleting the first two characters (which are really a UTF-16LE byte order mark). So you should be able to use that workaround to be able to edit the file for now.
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|