AspectJ with Special characters or accents

View: New views
5 Messages — Rating Filter:   Alert me  

AspectJ with Special characters or accents

by Megaman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone, i'm new in this forum and in the aspectj technology.
I'm from Argentina and we speak spanish here, and i'm developing and application.
As you imagine my application GUI has messages in spanish and in spanish we use special characters like accents to vocals and the 'ñ' letter.
I have been working with my application in java with those special characters with no problem, but when i add aspectj to my application all this characters appear wrong in the screen, this is a problem for me because:
1- I have write right in my lenguage
2- If i have to change all the special characters in my GUI, it's very complicated.

I hope somebody can help me. Thanks!

Re: AspectJ with Special characters or accents

by Andrew Eisenberg-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can you provide a snippet of code that shows the problem you are describing?

On Sun, Sep 7, 2008 at 2:19 PM, Megaman <dimacamp@...> wrote:

>
> Hi everyone, i'm new in this forum and in the aspectj technology.
> I'm from Argentina and we speak spanish here, and i'm developing and
> application.
> As you imagine my application GUI has messages in spanish and in spanish we
> use special characters like accents to vocals and the 'ñ' letter.
> I have been working with my application in java with those special
> characters with no problem, but when i add aspectj to my application all
> this characters appear wrong in the screen, this is a problem for me
> because:
> 1- I have write right in my lenguage
> 2- If i have to change all the special characters in my GUI, it's very
> complicated.
>
> I hope somebody can help me. Thanks!
> --
> View this message in context: http://www.nabble.com/AspectJ-with-Special-characters-or-accents-tp19334328p19334328.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@...
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: AspectJ with Special characters or accents

by Megaman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, here I paste a class code that when I compile with ajc, the Unicode characters don't appear right on screen:

<CODE>
/*
 * myJFrame.java
 *
 * Created on 8 de septiembre de 2008, 10:02
 */

package errorcaracteresaspectj;

/**
 *
 * @author  matias
 */
public class myJFrame extends javax.swing.JFrame {
   
    /** Creates new form myJFrame */
    public myJFrame() {
        initComponents();
    }
   
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText(" Problem with this chars: á , é , í , ó , ú and ñ");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
   
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new myJFrame().setVisible(true);
            }
        });
    }
   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
   
}
</CODE>


Andrew Eisenberg-3 wrote:
Can you provide a snippet of code that shows the problem you are describing?

On Sun, Sep 7, 2008 at 2:19 PM, Megaman <dimacamp@hotmail.com> wrote:
>
> Hi everyone, i'm new in this forum and in the aspectj technology.
> I'm from Argentina and we speak spanish here, and i'm developing and
> application.
> As you imagine my application GUI has messages in spanish and in spanish we
> use special characters like accents to vocals and the 'ñ' letter.
> I have been working with my application in java with those special
> characters with no problem, but when i add aspectj to my application all
> this characters appear wrong in the screen, this is a problem for me
> because:
> 1- I have write right in my lenguage
> 2- If i have to change all the special characters in my GUI, it's very
> complicated.
>
> I hope somebody can help me. Thanks!
> --
> View this message in context: http://www.nabble.com/AspectJ-with-Special-characters-or-accents-tp19334328p19334328.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: AspectJ with Special characters or accents

by Andy Clement :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just took that code sample, pasted it into a file in AJDT then ran it and the accented characters look fine in the window that appears.  

Do you have your code in a .java file or a .aj file?   (.java I assume)
What version of Eclipse/AspectJ/AJDT are you using? (I am on AJDT dev build on Eclipse 3.4)

cheers,
Andy.

2008/9/8 Megaman <dimacamp@...>

Yes, here I paste a class code that when I compile with ajc, the Unicode
characters don't appear right on screen:

<CODE>
/*
 * myJFrame.java
 *
 * Created on 8 de septiembre de 2008, 10:02
 */

package errorcaracteresaspectj;

/**
 *
 * @author  matias
 */
public class myJFrame extends javax.swing.JFrame {

   /** Creates new form myJFrame */
   public myJFrame() {
       initComponents();
   }

   /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    */
   // <editor-fold defaultstate="collapsed" desc="Generated
Code">//GEN-BEGIN:initComponents
   private void initComponents() {

       jLabel1 = new javax.swing.JLabel();

       setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

       jLabel1.setText(" Problem with this chars: á , é , í , ó , ú and
ñ");

       javax.swing.GroupLayout layout = new
javax.swing.GroupLayout(getContentPane());
       getContentPane().setLayout(layout);
       layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
           .addGroup(layout.createSequentialGroup()
               .addContainerGap()
               .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
380, Short.MAX_VALUE)
               .addContainerGap())
       );
       layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
           .addGroup(layout.createSequentialGroup()
               .addContainerGap()
               .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
278, Short.MAX_VALUE)
               .addContainerGap())
       );

       pack();
   }// </editor-fold>//GEN-END:initComponents

   /**
    * @param args the command line arguments
    */
   public static void main(String args[]) {
       java.awt.EventQueue.invokeLater(new Runnable() {
           public void run() {
               new myJFrame().setVisible(true);
           }
       });
   }

   // Variables declaration - do not modify//GEN-BEGIN:variables
   private javax.swing.JLabel jLabel1;
   // End of variables declaration//GEN-END:variables

}
</CODE>



Andrew Eisenberg-3 wrote:
>
> Can you provide a snippet of code that shows the problem you are
> describing?
>
> On Sun, Sep 7, 2008 at 2:19 PM, Megaman <dimacamp@...> wrote:
>>
>> Hi everyone, i'm new in this forum and in the aspectj technology.
>> I'm from Argentina and we speak spanish here, and i'm developing and
>> application.
>> As you imagine my application GUI has messages in spanish and in spanish
>> we
>> use special characters like accents to vocals and the 'ñ' letter.
>> I have been working with my application in java with those special
>> characters with no problem, but when i add aspectj to my application all
>> this characters appear wrong in the screen, this is a problem for me
>> because:
>> 1- I have write right in my lenguage
>> 2- If i have to change all the special characters in my GUI, it's very
>> complicated.
>>
>> I hope somebody can help me. Thanks!
>> --
>> View this message in context:
>> http://www.nabble.com/AspectJ-with-Special-characters-or-accents-tp19334328p19334328.html
>> Sent from the AspectJ - users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@...
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@...
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>

--
View this message in context: http://www.nabble.com/AspectJ-with-Special-characters-or-accents-tp19334328p19371991.html
Sent from the AspectJ - users mailing list archive at Nabble.com.

_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users


_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: AspectJ with Special characters or accents

by Megaman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Andy, I actually found the solution to my problem.
I fix it passing as argument to the ajc compiler the option -encoding UTF-8
I'm using netbeans by the way.


Andy Clement wrote:
I just took that code sample, pasted it into a file in AJDT then ran it and
the accented characters look fine in the window that appears.
Do you have your code in a .java file or a .aj file?   (.java I assume)What
version of Eclipse/AspectJ/AJDT are you using? (I am on AJDT dev build on
Eclipse 3.4)

cheers,
Andy.

2008/9/8 Megaman <dimacamp@hotmail.com>

>
> Yes, here I paste a class code that when I compile with ajc, the Unicode
> characters don't appear right on screen:
>
> <CODE>
> /*
>  * myJFrame.java
>  *
>  * Created on 8 de septiembre de 2008, 10:02
>  */
>
> package errorcaracteresaspectj;
>
> /**
>  *
>  * @author  matias
>  */
> public class myJFrame extends javax.swing.JFrame {
>
>    /** Creates new form myJFrame */
>    public myJFrame() {
>        initComponents();
>    }
>
>    /** This method is called from within the constructor to
>     * initialize the form.
>     * WARNING: Do NOT modify this code. The content of this method is
>     * always regenerated by the Form Editor.
>     */
>    // <editor-fold defaultstate="collapsed" desc="Generated
> Code">//GEN-BEGIN:initComponents
>    private void initComponents() {
>
>        jLabel1 = new javax.swing.JLabel();
>
>        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
>
>        jLabel1.setText(" Problem with this chars: á , é , í , ó , ú and
> ñ");
>
>        javax.swing.GroupLayout layout = new
> javax.swing.GroupLayout(getContentPane());
>        getContentPane().setLayout(layout);
>        layout.setHorizontalGroup(
>
> layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
>            .addGroup(layout.createSequentialGroup()
>                .addContainerGap()
>                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
> 380, Short.MAX_VALUE)
>                .addContainerGap())
>        );
>        layout.setVerticalGroup(
>
> layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
>            .addGroup(layout.createSequentialGroup()
>                .addContainerGap()
>                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
> 278, Short.MAX_VALUE)
>                .addContainerGap())
>        );
>
>        pack();
>    }// </editor-fold>//GEN-END:initComponents
>
>    /**
>     * @param args the command line arguments
>     */
>    public static void main(String args[]) {
>        java.awt.EventQueue.invokeLater(new Runnable() {
>            public void run() {
>                new myJFrame().setVisible(true);
>            }
>        });
>    }
>
>    // Variables declaration - do not modify//GEN-BEGIN:variables
>    private javax.swing.JLabel jLabel1;
>    // End of variables declaration//GEN-END:variables
>
> }
> </CODE>
>
>
>
> Andrew Eisenberg-3 wrote:
> >
> > Can you provide a snippet of code that shows the problem you are
> > describing?
> >
> > On Sun, Sep 7, 2008 at 2:19 PM, Megaman <dimacamp@hotmail.com> wrote:
> >>
> >> Hi everyone, i'm new in this forum and in the aspectj technology.
> >> I'm from Argentina and we speak spanish here, and i'm developing and
> >> application.
> >> As you imagine my application GUI has messages in spanish and in spanish
> >> we
> >> use special characters like accents to vocals and the 'ñ' letter.
> >> I have been working with my application in java with those special
> >> characters with no problem, but when i add aspectj to my application all
> >> this characters appear wrong in the screen, this is a problem for me
> >> because:
> >> 1- I have write right in my lenguage
> >> 2- If i have to change all the special characters in my GUI, it's very
> >> complicated.
> >>
> >> I hope somebody can help me. Thanks!
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/AspectJ-with-Special-characters-or-accents-tp19334328p19334328.html
> >> Sent from the AspectJ - users mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> aspectj-users mailing list
> >> aspectj-users@eclipse.org
> >> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >>
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@eclipse.org
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/AspectJ-with-Special-characters-or-accents-tp19334328p19371991.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>

_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
LightInTheBox - Buy quality products at wholesale price!