web stats
Mirth v1.2 - Import v1.1 channel concatenates code to single line - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-03-2006, 12:44 PM
nshaik nshaik is offline
Mirth Guru
 
Join Date: Sep 2006
Posts: 302
nshaik
Default Mirth v1.2 - Import v1.1 channel concatenates code to single line

============
Mirth v1.2
============

Tried importing channel created in v1.1 which had javascript filter and transformers with many lines of code.

It imports the code but under filter and transformer window the multiple lines of javascript code gets concatenated into a single line.
Reply With Quote
  #2  
Old 11-03-2006, 03:28 PM
brendanh brendanh is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 191
brendanh
Default Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

nshaik,

I just checked, and I am having the same problem on all text areas when importing a channel. It looks like the serializer is stripping out all of the character returns. I'll add this bug to JIRA if it is not already there.

-Brendan
__________________
Brendan Haverlock | Mirth Software Engineer | Mirth Corporation
Reply With Quote
  #3  
Old 11-06-2006, 10:22 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

This is not a bug. Unfortunantly the previous serialization of channels did not retain newlines. (It capture carriage returns, but this was not platform independent).

The new Mirth Syntaxt Text areas use the standard Java line delimiter (\n) rather than a platform specific delimiter to render text. This ensures that text processing and saving is consistent on all platforms. Additionally, the 1.2 serializer has been updated to retain newlines, so this issue will not appear with channels exported from 1.2.

In terms of fixing this for 1.2.1, we can include a replacement in the channel import class that changes carriage returns to newlines for code areas.

-Chris
__________________
Chris Lang
Reply With Quote
  #4  
Old 11-06-2006, 10:50 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

A simple fix for this is to use a text editor and run a search and replace for:

Code:


to 

\n
That should convert all of the carriage returns to newlines. Importing the channel then retains the newlines in all code/descriptions/templates.
__________________
Chris Lang
Reply With Quote
  #5  
Old 11-06-2006, 10:53 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: Mirth v1.2 - Import v1.1 channel concatenates code to single line

Replace (&amp above with an actual amperstand.

If you are building Mirth from source, you can change the "doImport" function in Frame.java:

Code:
Channel importChannel = (Channel)serializer.fromXML(channelXML.replaceAll("\\&\\#x0D","\\&\\#x0A");
__________________
Chris Lang
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shutdown Mirth from command line johnconnors General Discussion 2 01-30-2009 06:31 AM
How to import the download channel files codeSky General Discussion 4 03-18-2008 05:33 PM
Code example needed - import hl7 pathology result rterry Support 0 01-21-2008 12:48 PM
Channel Failing after import from 1.3.2 MBT766 Support 2 08-08-2007 12:34 PM
Merging multiple inbound channels into a single outbound channel lmann Development 2 11-26-2006 10:23 PM


All times are GMT -8. The time now is 07:44 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation