default userpic

Import not working...

Vote 0 Votes

Is there a reason why this format:

TITLE: PRIDE Nostalgia: Fedor Emelianenko AUTHOR: Leland Roling DATE: 1/9/2009 9:44:00 PM

CATEGORY: Fedor Emelianenko

BODY:

A lot of fans really get angry about PRIDE vs. UFC talk, and it has drawn a line in the fanbase at times… but looking back at some of the great battles from PRIDE when these guys were all younger, brings back some great memories.


Wouldn’t import?

I am simply trying to import a .txt file, and it’s just saying it’s importing, then it’s done, and nothing is in my dashboard whatsoever. What am I missing?

Reported on Movable Type 4.2

15 Replies

| Add a Reply
  • TITLE: PRIDE Nostalgia: Fedor Emelianenko

    AUTHOR: Leland Roling

    DATE: 1/9/2009 9:44:00 PM

    CATEGORY: Fedor Emelianenko

    -----

    BODY:

    A lot of fans really get angry about PRIDE vs. UFC talk, and it has drawn a line in the fanbase at times... but looking back at some of the great battles from PRIDE when these guys were all younger, brings back some great memories.

    -----

    --------

    Here's what it actually looks like, Editor ate it up.

    • It's gotta be an encoding issue. I just imported this one too into sockfish (development branch of the next version of Movable Type). Try this: http://www.codemonkeyramblings.com/sockfish/import/test2.txt

      • Thanks a lot for sticking with my pains, Mike.

        That test2.txt actually worked. So, my question is as to what I should be encoding? All of the text in the file? And what should I be encoding this to, Unicode?

        • It may also be a matter of end-of-line characters. Windows does not terminate lines the same way that Unix systems do. It's very common for people to have to run Windows text files through "dos2unix" on a Unix machine to make it really readable on Unix.

          • Mike, I'm not trying to make it readable on Unix. I'm running MT on my localhost, IIS 7, Vista.

            • That doesn't mean that Perl isn't assuming that formatting. Compare your file to mine, and make sure that your file follows the same rules as mine since it seemed to work for you.

              • When I get home this evening, I will actually type up the same file in Notepad, and see what happens. If that's the case, it's definitely an encoding issue of some sort.

                When I open the test file on Windows, Notepad just runs all the lines together, yet it still works. This is rather frustrating...

            • Lemme ask this...

              The line terminator, I simply "AppendLine" in my .NET application, so I'm assuming that this likely isn't doing to correct termination.

              I should be using \n but in my code, it'll write that literally to the file, so I'll have -----\n actually written in the file if I do so. I'm assuming I need to do some sort of encoding for the writer to recognize \n and break the line?

              • I've only done some hobby work in .NET, but the StreamWriters should have something that lets you do this:

                stream.Write("{1}\n", lineString);

                • I'll try that, but I've also been looking at the Environment Namespace and there is a way to add Carriage Returns to lines, so I'll try that as well.

                • Mike,

                  I was able to add Carriage Returns to the end of my lines, no difference. What I did do however was take your copies of your test files and simply copy and paste them to a new file, and then they suddenly didn't work, making me believe this is once again an Encoding problem.

                  What am I supposed to be encoding this as? Notepad seems to be bad idea in opening a file, then saving it.

                • Also, Mike...

                  From what I read, there cannot be any HTML tags or anything in the BODY? Is that true? So if I'm importing any formatting for my content, basically, it's stripped away?

  • Mike, I need an answer to my HTML tag question... but...

    I GOT IT!

    Your suggestion about putting it into UNIX format worked.

    Notepad++ has an option in a dropdown menu to Convert to UNIX format, once I did that, worked perfectly.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

694 2908

Last Topic: Blogspot to Movable Type by sdude on Feb 8, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 565

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012