Very strange behavior with to_date and format 'yddd' after 31/12/2009

Hi, I have the following PL/SQL code which retrieve a date from a production batch code as fallow:
DECLARE
dtmDateFabric DATE;
BEGIN
-- on teste si l'on peut reconstituer la date fabric à partir du code lot
dtmDateFabric := TO_DATE ('9348', 'yddd');
DBMS_OUTPUT.put_line ('dtmdatefabric ' || dtmDateFabric);
END;
batch code is constitued like this: YDDD year of production and day number in year.
This code was perfectly working before 2010 and it used to return December 14, 2009.
And now the same code returns December 14, 2019.
And I can't use 'rddd' as format.
Any idea to resolve this issue ?
Thank's for help.
Olivier

It's not strange at all, we are in 2010 now, so if don't specify the decade, century and millennium it takes the current: 2 (millennium) 0(century) 1(decade) and your year becomes 2019...
You have to add a byte to your year format to specify the decade:
SQL> DECLARE
  2  dtmDateFabric DATE;
  3  BEGIN
  4  -- on teste si l'on peut reconstituer la date fabric à partir du code lot
  5  dtmDateFabric := TO_DATE ('09348', 'yyddd');
  6  DBMS_OUTPUT.put_line ('dtmdatefabric ' || dtmDateFabric);
  7  END;
  8  /
dtmdatefabric 14-12-2009 00:00:00
Procedura PL/SQL completata correttamente.And you'll be ok untill 2099...
Max
[My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/07/creare-documenti-office-da-plsql/]
Edited by: Massimo Ruocchio on Jan 8, 2010 4:40 PM
Added explaination

Similar Messages

  • Strange behavior with Zoom and Image control

    HELP - I have a strange behavior (bug?) with using Zoom
    effect on an Image that has been placed on a Canvas. I am using
    dynamically instantiated images which are placed on a canvas inside
    a panel. I then assign a Zoom IN and Zoom Out behavior to the
    image, triggered by ROLL_OVER and ROLL_OUT effect triggers. THE BUG
    is that the image jumps around on the Zoom OUT and lands on a
    random place on the canvas instead of coming back to the original
    spot. This is especially true if the mouse goes in and out of the
    image very quickly. HELP -- what am I doing wrong? Computer = Mac
    OS X 10.4.9 Flex 2.0.1
    Here's a simple demo of the bug -- be sure to move the mouse
    in and out rapidly:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="setUp();">
    <mx:Script><![CDATA[
    import mx.events.EffectEvent;
    import mx.effects.Fade;
    import mx.effects.Zoom;
    import mx.rpc.events.ResultEvent;
    import flash.display.Sprite;
    import mx.core.UIComponent;
    import mx.controls.Image;
    private var zoomIn:Zoom;
    private var zoomOut:Zoom;
    private function setUp():void {
    var image:Image = new Image();
    image.id = "album_1_1";
    image.x = 200;
    image.y = 200;
    image.width = 64;
    image.height = 64;
    image.source = "
    http://s3.amazonaws.com/davidmccallie/album-128.jpg";
    image.addEventListener(MouseEvent.ROLL_OVER, doZoom);
    image.addEventListener(MouseEvent.ROLL_OUT, doZoom);
    myCanvas.addChild(image);
    zoomIn = new Zoom();
    zoomIn.zoomHeightTo = 2.0;
    zoomIn.zoomWidthTo = 2.0;
    zoomIn.captureRollEvents = true;
    zoomIn.suspendBackgroundProcessing = true;
    zoomOut = new Zoom();
    zoomOut.zoomHeightTo = 1.0;
    zoomOut.zoomWidthTo = 1.0;
    zoomOut.captureRollEvents = true;
    zoomOut.suspendBackgroundProcessing = true;
    private function doZoom(event:MouseEvent):void {
    var image:Image = Image(event.currentTarget);
    if (event.type == MouseEvent.ROLL_OVER) {
    zoomIn.target = event.currentTarget;
    zoomIn.play();
    } else if (event.type == MouseEvent.ROLL_OUT) {
    zoomOut.target = event.currentTarget;
    zoomOut.play();
    ]]>
    </mx:Script>
    <mx:Panel width="100%" height="100%"
    layout="absolute">
    <mx:Canvas id="myCanvas" width="100%" height="100%">
    </mx:Canvas>
    </mx:Panel>
    </mx:Application>

    There must be bugs in the Zoom effect code -- I changed the
    Zoom to Resize in the above code, and it works perfectly. Of
    course, Resize is not as nice as Zoom because you can't set the
    resize to be around the center of the image, but at least it works.
    Does anyone know about bugs in the Zoom effect?

  • Strange behavior with getCommonCharacterFormat and links

    I am working on a texteditor using TLF and Flash CS5. The problem I have is that when I use getCommonCharacterFormat on a single point selection the behavior is different if I have a link-tag adjacent to the selection compared to not having it.
    Think of a text like this: "Hello beautiful world!"
    - When I place the cursor at the end of the text in bold the format says bold and when i continue to write the text will be in bold.
    - When I place the cursor just before the text in bold the format says not bold and when i continue to write the text will not be in bold.
    This makes perfectly sence to me and is exactly what I would expect to happen.
    But if I make the word "beautiful" into a link the behavior is very different.
    - When I place the cursor at the end of the text in bold the format says not bold but when i continue to write the text will be in bold.
    - When I place the cursor just before the text in bold the format says bold but when i continue to write the text will not be in bold.
    Is this a bug or is there a good explanation to this behaviour? Should I do want I want to do in a different way?
    I you want me to I can paste some example code that illustrates my problem.
    /Peter

    Sounds like a bug. The issue, for what it's worth, is that typing after a link is different than typing after a span, because new text that you type isn't added to the link. We'll investigate.
    - robin

  • Very strange bug with AIR and native process (Windows 7, EXE)

    Hello to everyone!
    The situation is:
    I've made an AIR Application, inside of that is running a native process - EXE file.
    I'm using Flash CC as IDE and tried to use compile that as EXE with AIR 2.6 and 3.6 - results are same.
    So I've insert inside a checking if Native Process is supported or not and the Native process is supported all the time.
    When I've just installed the application and run it - the very first attempt is good - everything is working as a must: internal EXE is called by my Application with necessary parameters as many time as I'm need.
    However if I'll close the App and then will run it again - internal EXE is not starting at all, doesn't depends on number of attempts to re-start of the App.
    So only way is to uninstall, install it back and then you'll be one more session of successful internal EXE-requests, till the next re-start of the App.
    That's it.
    I've tried to "google it" but unsuccessful. Probably the bug is very rare.
    Help me please?
    Update: at compilation with Flash CC IDE it's working all the time with no any issues.
    Update-2: when I'm running installator-EXE, there is going a notification "Same version is installed, etc." and then selected "Run Now" - there is also working with no problems.

    Well, I've found the solution and answer by myself and here is it please:
    In case with same situation as above you need to add just one line in your AS3-code
    nativeProcessStartupInfo.workingDirectory = File.applicationDirectory;
    And you will be happy so much

  • Strange behavior with Premiere and effects in CS6

    Hello
    I created a PS file with several layers of a subject for a TV show idea i am preparing for a presintation but every time a render my effects are not as i see them., speciffialy the 8-16 point Garbage mattes and keying.
    The PS files where dragged and dropped into Premiere and as Sequences to maintin them in folders and in a Nested Sequence.,
    Then i sort of sequences masked PS layers, using Ultra key to punch out the greene screen,  8/16 point Gabrage mattes to take out any other noise or background images un wanted, MOJO to warm up the subject i then placed the sequence as a NESTED sequence in my time line, but when i would render the Garbage Mattes, keying and all would be partially showing a previous tweek, but when i open the nested Sequence i would not see these errors or older tweeks, yet in the main Sequence aka composition i would see them yet when i would place the mouse over the time line to select an area for the position to play they would go away again,
    sounds like a bug?
    OSX10.7.4 
    imac i7 12GB
    8TB RAID
    CS6 Suite
    Message was edited by: Andrew Yoole
    This message was relocated from the After Effects Forum.

    There must be bugs in the Zoom effect code -- I changed the
    Zoom to Resize in the above code, and it works perfectly. Of
    course, Resize is not as nice as Zoom because you can't set the
    resize to be around the center of the image, but at least it works.
    Does anyone know about bugs in the Zoom effect?

  • Two very STRANGE problems with JWindow and JTextField

    I am having some trouble in the program that I am making. It is a Swing based GUI.
    I have a JWindow with a JPanel in it that holds JTextFields and JLabels.
    problem1----I can't see a caret in any of the textfields but I can still enter text.
    problem2----If I control + tab to another window, and control + tab to get back to the JWindow then I can see a caret, but the caret will not change if I click on another textfield and also I can't move to another textfield to enter text. If i do another control tab, then the textfield that i tried to switch to will have focus, but there is now two carets...the first one is where I was but that field does not have focus. I can do this control-tab for as many textfields as I need to fill, but it obviously is not practical.
    I am using a call to super(Frame frame) when calling my JWindow but that didn't seem to fix it.
    Any help would be great!!!!! thanks john

    try checking out this thread :
    http://forum.java.sun.com/thread.jsp?forum=57&thread=153344
    sounds like your problem, kinda. it looks more like a repaint issue, since u get two carets at the same time - as if the screen isn't refreshing enough (u could give it some Spearmint POLO :)

  • Strange behavior with 3560s and RPS 2300

    I just installed an RPS 2300 in a small branch office that has a pair of WS-C3560-24PS switches.  There are two odd things I'm noticing:
    1) When I do "show env rps", it shows the RPS detected but I don't get any information about it.
    Switch#show env rps
    SW  Status          RPS Name          RPS Serial#  RPS Port#
    1   Active          <>
    2) When the switch loses power it fails over to the RPS just fine, but does not fail back to regular power automatically.  I have to unplug the RPS. 
    I've installed same model RPS with a pair of 3750-Es switches, and in that case, "show env rps" from the switch shows me the RPS information, and failback happens when regular power is restored.
    Is there something different about the 3560s, or did I miss something in the configuration?  The switches are running 12.2(55)SE7, IP Services.

    Yes, just found via searching automatic failback is only supported on the 3560-E and 3750-E.
    https://supportforums.cisco.com/message/3669961#3669961
    Also noticed the "power rps" commands are only supported on the 3560v2, so those won't work for me.
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3560/software/release/12-2_52_se/command/reference/3560cr/cli1.html#wpmkr11908996
    What's funny is while the exec commands don't work, the config-mode commands do. 
    Switch#power rps name serialnumber
    Can not execute cmd on legacy switch 1
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#power rps deviceid serialnumber
    Oh well.  I've been wanting to replace the 3560s with 3750Gs, so this is yet another reason to do so!

  • Strange behavior with Label#setWrapText(true) in GridPane.

    I've got a strange behavior with a Label, which has setWrapText(true) in a GridPane.
    Check out the sample and click the button.
    You see, that the GridPane suddenly behaves as if it had GridPane.setVGrow and HGrow set for the lblStatus.
    (it takes the full available space).
    Furthermore the first column shrinks to a minimum, so that lblText1 can't display its text anymore.
    Tested with 2.1 GA.
    Any help with that?
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class TestApp4 extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(final Stage stage) throws Exception {
            GridPane gridPane = new GridPane();
            gridPane.setPadding(new Insets(2, 2, 2, 2));
            Label lblText1 = new Label();
            lblText1.textProperty().set("Some text");
            Label lblText2 = new Label();
            lblText2.textProperty().set("Some other text");
            Button btnClick = new Button();
            btnClick.textProperty().set("Click me");
            final Label lblStatus = new Label();
            lblStatus.setWrapText(true);
            gridPane.add(lblText1, 0, 0, 1, 1);
            gridPane.add(lblText2, 1, 0);
            gridPane.add(lblStatus, 0, 2, 2, 1);
            gridPane.add(btnClick, 0, 3, 2, 1);
            btnClick.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    lblStatus.setText("very long text, very long text, very long text, very long text,very long text, very long text");
            gridPane.setGridLinesVisible(true);
            Scene scene = new Scene(gridPane, 300, 300);
            stage.setScene(scene);
            stage.show();
    }Edited by: csh on 19.07.2012 03:35

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • Strange behavior with Bindings??

    Hello to all JavaFX 2 Binding experts,
    I have a strange behavior with Bindings in JavaFX 2.2 (Java 1.7 update 21). Please have a look at the following source code:
    package test;
    import javafx.application.Application;
    import javafx.beans.binding.BooleanBinding;
    import javafx.beans.property.SimpleBooleanProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.fxml.FXML;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.RadioButton;
    import javafx.stage.Stage;
    public class BindingVsProperty extends Application
        @FXML
        private RadioButton opt11;
        @FXML
        private RadioButton opt12;
        @FXML
        private RadioButton opt21;
        @FXML
        private RadioButton opt22;
        @FXML
        private Label lbl11And21;
      @Override
        public void start(Stage arg0) throws Exception
            FXMLLoader l_loader = new FXMLLoader();
            l_loader.setLocation(BindingVsProperty.class.getResource("BindingVsproperty.fxml"));
            l_loader.setController(this);
            l_loader.load();
            Scene l_scene = new Scene((Parent)l_loader.getRoot());
            arg0.setScene(l_scene);
            useBinding1();
            //useBinding2();
            //useBinding3();
            arg0.show();
        private void useBinding1() // NOT WORKING - ChangeListener.changed(..) is not called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        private void useBinding2() // OK - ChangeListener.changed(..) is called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            lbl11And21.visibleProperty().bind(l_andOpt11Opt21);
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        private void useBinding3() // NOT WORKING - ChangeListener.changed(..) is not called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            new SimpleBooleanProperty(false).bind(l_andOpt11Opt21);
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        public static void main(String[] args)
            launch(args);
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.paint.*?>
    <BorderPane id="BorderPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefWidth="371.0" xmlns:fx="http://javafx.com/fxml">
      <center>
        <AnchorPane prefHeight="200.0" prefWidth="200.0">
          <children>
            <Label id="lblAnd" fx:id="lbl11And21" layoutX="82.0" layoutY="121.0" text="Group1 Opt1 AND Group2 Opt1 is true" textFill="#41cc00" visible="false" />
            <RadioButton fx:id="opt21" layoutX="216.0" layoutY="24.0" mnemonicParsing="false" text="Group 2 - Opt 1">
              <toggleGroup>
                <ToggleGroup fx:id="group2" />
              </toggleGroup>
            </RadioButton>
            <RadioButton fx:id="opt22" layoutX="216.0" layoutY="67.0" mnemonicParsing="false" text="Group 2 - Opt 2" toggleGroup="$group2" />
            <RadioButton fx:id="opt11" layoutX="29.0" layoutY="24.0" mnemonicParsing="false" text="Group 1 - Opt 1">
              <toggleGroup>
                <ToggleGroup fx:id="group1" />
              </toggleGroup>
            </RadioButton>
            <RadioButton fx:id="opt12" layoutX="29.0" layoutY="67.0" mnemonicParsing="false" text="Group 1- Opt 2" toggleGroup="$group1" />
          </children>
        </AnchorPane>
      </center>
    </BorderPane>
    What I need for my application is the use case in useBinding1(), i.e., a BooleanBinding where several listeners are attached to. The problem is that I never get a callback in the ChangeListener if one of the RadioButton.selectedProperty() is changed.
    Now I tried what happens if I use the same BooleanBinding for another binding to a property plus the listener, now the listener gets callbacks as expected! (see useBinding2() )
    Than I thought may be Bindings must be bound in order to trigger listeners and tried useBinding3() where I bind the BooleanBinding to a new BooleanProperty, in this case the listener doesn't get callback anymore...
    And now I'm very frustrated and hope that anyone out there can help me to understand this strange behavior.
    Thanks a lot!
    WhiteAntelope

    All these work just fine for me: the listeners are all called as expected. Note that the listener is only invoked when the value of the binding actually changes, which doesn't happen every time a radio button is pressed. (For example, if both buttons are unselected, the binding is false. If one button is selected, the binding remains false and the listener is not invoked. When the second button is selected, the binding becomes true, and the listener is invoked.)

  • Strange behaviors between TextInputSkin and StageTextInputSkin

    Hi All,
    I met a very strange behaviors, and need help with, any idea will be truly appreicated.
    I have a phone field and date field both from TextInput field, I aslo have textfieldskin which is original from TextInputSkin.
    When I apply the TextInputSkin to the TextInput field, the softKeyboard Type can not be modified. I found out that as TextDisplay is not StyleableStageText, the autocorrect, type, etc can not be modified while StageTextInputSkin will work just fine.
    However, when I applied the StageTextInputSkin to my fields, the mouse click event can not be rececived any more...
    My question: How can I change the softkeyboardType and be able to receive mouse click event at same time if my control is from TextInput?
    Kind Regards,

    6 months, and a new cs6 with no improvements on this issue.
    My biggest problem is with an android ICS unit the softkeyboarddeactivated gets called when the keyboard switches and shows the mic speak input keyboard but softkeyboardactivating or activated does not get called when the mic input keyboard is shown.
    Also the scrolling bug is horrible and needs to be fixed.
    and keypresses are needed.
    and being able to layer the native components would be great.
    im sad.

  • Strange behavior with csv flat file integration

    Hi,
    i've a real strange behavior with csv flat file integration.
    I've defined the file inbound with | as separator
    Here is the sender payload result, extra columns appears !
    <row>
      <VAL1>D</VAL1>
      <VAL2 />
      <VAL3>01</VAL3>
      <VAL4 />
      <VAL5 />
      <VAL6>003160000</VAL6>
      <VAL7 />
      <col>003160001</col>
      <col />
      <col>2</col>
      <col />
      <col>91200604212</col>
      <col />
      <col>VIRTUAL DJ HOME EDITION</col>
      <col />
      <col>2</col>
      <col />
      <col>2</col>
      <col />
      <col />
      <col>2</col>
      <col />
      </row>
    When i changed the separator to ; in my file and in the file inbound it gives the following.
    Everything is ok.
    <row>
      <VAL1>D</VAL1>
      <VAL2>01</VAL2>
      <VAL3 />
      <VAL4>003160000</VAL4>
      <VAL5>003160001</VAL5>
      <VAL6>7</VAL6>
      <VAL7>91200604212</VAL7>
      <col>VIRTUAL DJ HOME EDITION</col>
      <col>10</col>
      <col>10</col>
      <col />
      <col>10</col>
      </row>
    Why using a different separator would change the payload ?
    It will be a good thing for me if I could use the pipe separator.
    Thanks

    Can you give the steps you're using to get this error? I'm not seeing any problem here.
    1) Create a new audio project (44.1 KHz).
    2) Arm the record head in track 1 by pressing the "R" button in that track. Verify audio levels.
    3) Record by pressing the record button in the audio controls.
    4) Stop recording by pressing the stop button.
    5) Play back the resulting audio. Sounds fine.
    6) Select File > Export.
    7) Change the file format to WAVE file. Change the bit depth to 16 bit, change the sample rate to 44.1 KHz.
    8) Type the name SAVETEST.wav and click on the Export button.
    9) Play back the resulting WAV file in QuickTime Player, Apple Loops Utility, etc. and it seems just fine.
    What am I missing that you're doing?

  • Hey, i have very strange prob with my iphone 5(latest version/updated), after resetting it, so it doesn't connect to my laptop, even it doesn't charge too. it does charge from wall charger i try all the possible methods but still i am facing the prob

    Hey, i have very strange prob with my iphone 5(latest version/updated), after resetting it, so it doesn't connect to my laptop, even it doesn't charge too. it does charge from wall charger i try all the possible methods but still i am facing the prob any fix/solution for it.. Helppppp!!!!!!!!!!!!!!!!!!!!!!!! As soon as possible, it will be gratefulness,
                                Thnksssssss....

    So you are saying that you followed all of the steps in the support document for problems with connection, including removing and reinstalling iTunes? You do not say what you have tried, so it is hard to make recommendations. If this is the case, then you have tried resolving driver issues? What if you go to Device Manager and look for the iPhone. You should be able to click on it and see about drivers. You can update/reinstall the device driver.

  • Strange behavior with DefaultCellEditor

    Hello everybody,
    I found a strange behavior with DefaultCellEditor using a JTextField in a JTable. The following line will show, what I mean:
    setDefaultCellEditor(String.class,new DefaultCellEditor(new JTextField()));
    Imho this should do the same as JTable does already, when it installs a JTextField as default cell editor for cell values of the String class. But, it seems, that it is not the same:
    When I add this line in the constructor of a JTable subclass the editor component seems to be less wide and less high to the right and bottom - it looks so with Win95 with JDK 1.4.0 - but with Win2000 it is correct for example.
    My question is - how can it be, that the normal default cell editor does not have this behavior but when I use the line above, it is displayed in the wrong way?- What does the default cell editor in another way than I do it, that it has not this ugly display?
    I would like to look in the sources, but unfortunately I can't find the source code in JDK 1.4.0 - perhaps you have a hint, where to find it.
    greetings Marsian

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • Strange behavior with Collections

    Hello!
    I have a - from my point of view - strange behavior with a List (same also applies to Vector, LinkedList, and others):
    List<String> myList = new myList<String>;
    myList.add("One");
    while (true) {
    try {
    System.out.println(myList.size());
    throw new Exception();
    } catch (Exception e) {
    e.printStackTrace();
    }And the result is 1, 2, 2, 2, ...although I added only one element. The two elements in the List point to the same object.
    What could case this issue?
    Regards,

    len00x wrote:
    List<String> myList = new myList<String>;This doesn't even look like it will compile for at least one reason, easily two.

  • Strange behavior with "insertTextAsContent"

    Hi,
    I've got a strange behavior with this loop :
    for (j = 0; j < myParagraph.characters.length-1; j++) {
         var myCharacter = myParagraph.characters[j];
         if (myCharacter.appliedFont.fontStyleName == "Regular") {
              alert(myCharacter.contents);
              myXmlElement.insertTextAsContent(myCharacter.contents, XMLElementPosition.ELEMENT_END);
    I loop through every characters of a paragraph, test if they are "regular", "italic", "bold"..., and store them in different xmlElement. Everything is fine except that every double characters (in french : homme, cette, elle, ville...) output in my xmlElement as one only character (home, cete, ele, vile...). I try with "aaaaaazzzzzzeeeeeerrrrrtttttyyyyy" and it give me, the same way, "azerty" ?!
    The "alert" line output the correct full sentences character by character ("h", "o", "m", "m", "e"...).
    If you have any idea to explain, you are more than welcome
    Thanks
    ** edit : don't know if it's important but I'm using CS6 **

    Hi
    Have you seen this in the object model viewer?
    XMLElement.insertTextAsContent (using:varies, position: XMLElementPosition ): Text
    Adobe InDesign CC (8.0) Object Model
    Inserts the specified text as content before, in, or after the XML element.
    using: Data Type: varies
    The text to be inserted. Can accept: String or SpecialCharacters enumerator.
    position: Data Type: XMLElementPosition
    The position at which to insert the text. Note that text inserted before or after the element does not become part of the content of the element. Instead, it becomes content of the parent of the element.
    Don't ask me why it works when there is no doubled character
    So i tried the following and it worked. I hope this will solve your problem.
    function main() {
         if (app.documents.length != 0) {
            var myDoc = app.activeDocument;
            var myParagraph = myDoc.textFrames[0].paragraphs[0];
            var myXmlElement  = myDoc.xmlElements[0];
            for (j = 0; j < myParagraph.characters.length-1; j++) {
                var myCharacter = myParagraph.characters[j];
                if (myCharacter.appliedFont.fontStyleName == "Regular") {
                    alert(myCharacter.contents);
                    myXmlElement.contents += myCharacter.contents;
                    alert(">" + myXmlElement.contents+ "<");
                }     // if
            }     //for
        }     // if
    }   // main()
    Kind regards
    Dani (from Switzerland)

Maybe you are looking for

  • What cable do I need to connect my ipod classic to my tv?

    I am wondering if anyone can help me? I have an ipod classic 160gb, hoping to watch some of the movies/tv episodes I have on there on my tv. I realise that only apple's own brand cables work with the ipod classic, but which one do I use? I have a pre

  • Can't use LINE IN audio with iSight Camera on iMovie 08

    I want to record a video, using the internal iSight camera of my iMac, but I want to use the "line in" audio instead of the internal microphone of my iMac. I have tried for hours, and done the obvious things (selecting "line in" under System Preferen

  • How can I find out WHEN a specific iPhone was reported stolen?

    I bought a storage unit at auction.  There was a brand new iphone 4S, among other items, in the locker.  Many had receipts with the owner's name so I know it wasn't a storage unit full of stolen merchandise.  I ran a check of the iphone through a web

  • Add-days-to-date  throwing error in formcalc

       I am receiving an error of Error: Accessor 'add' is unknow. Any help is much appreciated. Justin    

  • Exporting Raw to PS

    Hi, I've update both Apple & Adobe Photoshop CS2 support file on my iMac, and vertified that both Aperture & Photoshop reads my camera's raw files. I'm importing all my pictures in Aperture, how do i export raw image to photoshop, when I Control-Clic